• Register
0 votes
848 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 2.2K views
2.2K 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
0 votes
1 answer 72 views
72 views
Problem : I am currently using the SourceTree and trying to clone it from the general github repository, but I am facing below error: “Fatal: unable to access 'https://github.com/mfitzp/15-minute-apps.git/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version Completed with errors, see above.” How can I resolve it?
asked Jan 3, 2020 alecxe 7.5k points
0 votes
1 answer 828 views
828 views
Problem : This is the very first time that I am using Jenkins and I have gone through the several articles but unable to find any satisfactory answers. We have the .Net project, and we are using our private GitHub repository. ... hooks on GitHubRepositoryName[host=github.com,username=MyCompanyName,repository=reponame] at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:342)
asked Dec 27, 2019 alecxe 7.5k points
0 votes
1 answer 38 views
38 views
Problem : Currently I am trying to use TortoiseGit on Windows. But when I want to Clone from a context menu of my standard Windows Explorer, I face below error: Please make sure you have the correct access rights and the repository exists How can I make my git work properly?
asked Jan 10, 2020 alecxe 7.5k points
0 votes
1 answer 52 views
52 views
Problem : I am trying to use the TortoiseGit on my Windows. But when I want to Clone it from my context menu of the standard Windows Explorer then I face below error: Please make sure you have the correct access rights and the repository exists In more detail the complete snapshot of ... exit cleanly (exit code 128) (21450 ms @ 17.12.2019 10:36:58) What should I do to make my git work correctly ?
asked Dec 19, 2019 alecxe 7.5k points
0 votes
1 answer 2.3K views
2.3K views
Problem : I am trying to run startx via PuTTY and Xming but it gives following error: putty x11 proxy: unable to connect to forwarded x server: network error: connection refused
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 54 views
54 views
Problem : I am unable to clone my Git repository and getting below error: ​/c/Projects $ git clone http://stage.abc.com:10088/pqr http://<url>/<repository> Cloning into '<repository>'... fatal: could not read Username for 'http://<url>': No such file or directory ​ How can I fix the above error?
asked Jan 16, 2020 jwilliam 3.9k points
1 vote
1 answer 95 views
95 views
Problem : I am unable to clone my Git repository, and getting below error: /c/Projects $ git clone http://stage.abc.com:10088/pqr http://<url>/<repository> Cloning into '<repository>'... fatal: could not read Username for 'http://<url>': No such file or dir Please let me know any pointers to resolve my error.
asked Dec 30, 2019 alecxe 7.5k points