What if you explicitly unset it within R, e.g.
Sys.unsetenv("DISPLAY")
before trying to perform a Git push? My hypothesis is that, when Git is invoked by RStudio, something is causing it to try to invoke /usr/lib/ssh/ssh-askpass, which shouldn't be needed or required. Note that RStudio runs git as a child process, and so would inherit any environment variables set in the R session.
It may also be worth saying that these environment variables may not necessarily match what you've set in your terminal through your startup profiles.
You could also try unsetting the GIT_ASKPASS and SSH_ASKPASS environment variables; e.g.
Sys.unsetenv("GIT_ASKPASS")
Sys.unsetenv("SSH_ASKPASS")
and see if that makes a difference.