• Register
0 votes
1.3k views

Problem :

I am working on the project remotely through the command line on the machine to which I don't have the admin rights and after running git push origin master I get the below error message:

(gnome-ssh-askpass:29241): Gtk-WARNING **: cannot open display:

My .git/config file has the below contents:

    [core]
       repositoryformatversion = 0
       filemode = true
       bare = false
       logallrefupdates = true 
    [remote "origin"]
       fetch = +refs/heads/*:refs/remotes/origin/*
       url = https://username@github.com/username/repository.git 
    [branch "master"]
       remote = origin
       merge = refs/heads/master

Initially I was getting the 403 error. When I put the username before the @ sign in the remote url shown in above file and since then, I am facing the Gtk error.

Whenever I try to login to the machine using ssh -X and try to push, I often face the below error:

X11 connection rejected because of wrong authentication.
(gnome-ssh-askpass:31922): Gtk-WARNING **: cannot open display:localhost:10.0

If I try to change the url of the remote box to git@github.com:username/repository.git, then I face different error and it is as below :

ssh: connect to host github.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly

Does anyone have any solution for my issues?

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I have finally discovered the solution to your problem. I ran the below command in the terminal:

unset SSH_ASKPASS

and after that ran the git push origin master and it works the way it should. You should also add the above given line to your .bashrc file.

9 7 4
38,600 points

Related questions

0 votes
1 answer 12 views
12 views
Problem: I need someone’s assistance to solve my problem .. Command to delete a remote branch in git
asked May 1 Ifra 37.2k points
0 votes
1 answer 5 views
5 views
Problem: git revert one file to previous commit.
asked Apr 11 Dan phillip 4.8k points
1 vote
1 answer 4 views
4 views
Problem: I am getting the following error : $ git push heroku master Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts. ! Your key with fingerprint b7:fd:15:25:02:8e:5f:06:4f:1c:af:f3:f0:c3:c2:65 is not ... when I got the error : $ ssh-add ~/.ssh/id_rsa.pub Could not open a connection to your authentication agent.How can I solve this error ?
asked May 4 Raj Tyagi 15.6k points
1 vote
1 answer 10 views
10 views
Problem: I am runing into this error of: $ git push heroku master Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts. ! Your key with fingerprint b7:fd:15:25:02:8e:5f:06:4f:1c:af:f3:f0:c3:c2:65 is not ... I tried to add the keys and I get this error below: $ ssh-add ~/.ssh/id_rsa.pub Could not open a connection to your authentication agent.
asked May 2 PkGuy 23.5k points
0 votes
1 answer 4 views
4 views
Problem: I am stuck now .. need some suggestions .. please help me .. Ssh ssh_exchange_identification connection closed by remote host
asked Apr 26 Ifra 37.2k points
0 votes
1 answer 15 views
15 views
Problem: please help me to solve it... the ssh command responded with a non-zero exit status. vagrant
asked Apr 1 Ifra 37.2k points
0 votes
1 answer 6 views
6 views
Problem: I've cloned a private repo, forked it and made som changes into a feature branch. When I try to push these changes into the repo i get the following message: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the ... to push with git push --set-upstream origin but it's just showing me the same error. Have anyone of you seen this before?
asked Apr 24 sumaiya simi 43.9k points
0 votes
1 answer 5 views
5 views
Problem: I have no idea how to solve this, someone help >Server response does not contain ssh protocol identification
asked 4 days ago Chi Omega 13.6k points
0 votes
1 answer 50 views
50 views
Problem : how can i deal with this situation and fix it ? Fatal: could not read username for 'https://github.com': no such device or address.
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 3.3K views
3.3K views
Problem : I have the below problem when I just try to pull code, using my GIT Bash on windows Even after adding/removing the origin I am still facing the same error as below. Fatal: could not read Username for 'https://github.com': No such file or directory
asked Dec 19, 2019 alecxe 7.5k points