ungit: Can't authorize over ssh.

I can’t seem to get remote repos work over ssh. I tried multiple different ssh-agent setups and all did result with this warn:

Responding with ERROR:  {"isGitError":true,"errorCode":"permision-denied-publickey","command":"-c color.ui=false -c core.quotepath=false -c core.pager=cat -c credential.helper=C:/Users/User/AppData/Roaming/npm/node_modules/ungit/bin/credentials-helper 0 8448 ls-remote --tags origin","workingDirectory":"C:\\node_workspace\\testProject","error":"Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n","message":"Permission denied (publickey).\r","stderr":"Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n","stdout":""}
2017-11-15T11:37:19.091Z - warn: Responding with ERROR:  {"isGitError":true,"errorCode":"permision-denied-publickey","command":"-c color.ui=false -c core.quotepath=false -c core.pager=cat -c credential.helper=C:/Users/User/AppData/Roaming/npm/node_modules/ungit/bin/credentials-helper 0 8448 fetch origin --prune","workingDirectory":"C:\\node_workspace\\testProject","error":"Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n","message":"Permission denied (publickey).\r","stderr":"Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n","stdout":""}

I’m working on Windows 10. I’d say something seems to be wrong, since I don’t even get prompted for passphrase, while everything works fine through git-bash with either identity added to ssh-agent or without (I just get prompted for passphrase).

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (2 by maintainers)

Most upvoted comments

I’m having this same type of authorization issue on macOS. I’m prompted to enter my passphrase for the key, but it won’t accept the correct passphrase for some reason. I can push to Github with no issues using exactly the same passphrase seconds later in another terminal session.

I just ran into this on a fresh ungit install on ubuntu (with npm v10.15.3).

My git remote for this repo is ssh://gh/foo/bar. Foo and bar are fake, but gh is an alias that I’ve set up in ~/.ssh/config.

Hopefully helpful data point:

It’s using the key ~/.ssh/keys/id_rsa.

After I started ssh-agent (which I despise: I want to enter my passphrase so I know when software is accessing one of my remote machines) and added the key, I was able to run without any problems.