Cannot get git extensions to push something to git

2019-02-13 14:27发布

Im trying to use git extensions and I really like it so far, but I don't manage to push to github. The following command works fine in git bash:

git push "origin" master:master

and then when I push with git extensions I get this:

C:\Program Files\Git\bin\git.exe push "origin" master:master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Done

In the git settings it just has openSSH selected which I would like to keep because putty seems more hassle.

The remote addres I have added in gitextensions, actually the only thing I have done from the bash just to test is the command above and gerenating the SSH keys. All else is set up in git extensions. So I suppose everything must be set up correctly. Eg, the email adress and name are correct...

ssh git@github.com

also connects fine, from bash

edit:

So I can reproduce the error by putting the command from git-extensions in cmd. Appearantly there is a difference between running from git bash and from cmd and git-extensions runs this command like a windows command... any clues?

update: If I choose git-bash from the menu in git-extensions I get a window that is exactly the same as when I right click in explorer on my repo folder and choose git bash here. Now, in the one opened from explorer I can push and in the one opened from extensions I get the public key problem.

7条回答
我只想做你的唯一
2楼-- · 2019-02-13 15:24

I see that the HOME variable is set to USERPROFILE in git extensions. I can add and commit but not push/pull from the remote repository. I am unable to connect to any remote repository. We use http (not ssh) for the connection. However, using git bash I am able to connect to the remote and do push/pull. I had put my issue GIT extensions does not connect to remote but git bash does and was directed to this issue. However, I am unable to resolve my issue. Any ideas?

查看更多
登录 后发表回答