I\'ve been working on my project remotely through the command line on a machine to which I don\'t have admin rights and after running git push origin master I g
You can also try to login using ssh -Y to the remote server so the dialogue box can appear graphically.
Like the OP, logging in via ssh -X didn't work. When trying to push, the server simply repeated the same error message - (gnome-ssh-askpass:29241): Gtk-WARNING **: cannot open display: - as it did when logging via ssh with no X11 forwarding. This is slightly different behavior from what the OP reported when he tried ssh -X as his error message changed slightly from just using ssh.
However, for me, once logged in using ssh -Y: there was no error, the password dialogue box popped up, I typed the password in, and GitHub accepted the push.
As a forewarning, ssh -Y can open up security problems as you are treating the remote server as a trusted client (https://askubuntu.com/questions/35512/what-is-the-difference-between-ssh-y-trusted-x11-forwarding-and-ssh-x-u). So be careful when using it.