How can I prevent RStudio Server from overriding GIT_ASKPASS on startup?

With Rstudio-server 2023.12.0 Build 369 on ubuntu 20.04, I am trying to set the GIT_ASKPASS environment variable for the Rstudio session.

I have tried setting it in the file as well as in ~/.Renviron. I also tried setting it to the value I need in ~/.Rprofile and in ~/.bashrc.

In all cases I see that what I set it to gets overridden somewhere in the RStudio startup, such that in the R console in RStudio if I run Sys.getenv('GIT_ASKPASS') I get rpostback-askpass , which is NOT the value that I set it to or that I need.

I see that my code in ~/.Rprofile runs on startup, and I even print there a message with the value that I need (after setting it there with Sys.setenv(GIT_ASKPASS='my_special_value')). Nevertheless, in the R console GIT_ASKPASS still evaluates to rpostback-askpass, and in the terminal window in RStudio it seems that GIT_ASKPASS somehow is not set at all.

Clearly something in the RStudio Server startup sequence is overriding the value I set for GIT_ASKPASS after, ~/.Renviron, ~/.Rprofile etc. all run.

How can I prevent RStudio Server from overriding the value that I set for GIT_ASKPASS ?

I don't think it is currently possible to prevent RStudio Server from overriding GIT_ASKPASS, c.f.
What is it you are trying to achieve?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.