question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't authorize over ssh.

See original GitHub issue

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).

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
codewisdomcommented, Mar 17, 2018

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.

1reaction
jimrthycommented, Apr 20, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't ssh even with public key added to authorized_keys
First check the file ~/.ssh/id_rsa exists on your local machine, and is the correct one _(if you have more). · Check .ssh folder...
Read more >
Can't Authorize SSH Key in cPanel - A Little of Both
I was working on a new website that is on a shared host using cPanel. I contacted the host and had them activate...
Read more >
Configuring SSH Public Key Authentication on Windows
It means that you want to connect to a remote SSH server with the IP address 192.168.1.15 under the user1 account. SSH Agent...
Read more >
How to Use SSH Public Key Authentication - Linode
If a server that uses SSH keys is compromised by a hacker, no authorization credentials are at risk of being exposed.
Read more >
SSH server won't recognize authorized_keys - Server Fault
If you have access to the SSHd configuration you can check if PubkeyAuthentication is set to yes to allow public key authentication.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found