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.

Show obvious error message if no working ssh key available

See original GitHub issue
% gist edit c17592d5ef054e634c7dbe48be0c186f
Cloning into 'c17592d5ef054e634c7dbe48be0c186f'...
Warning: Permanently added the RSA host key for IP address '192.30.253.119' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
1519185641.230 ERROR[gist] [Errno 2] No such file or directory: 'c17592d5ef054e634c7dbe48be0c186f

gist list works perfectly

I have access rights gist, notifications, repo for my token

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jdownercommented, Feb 21, 2018

I created a new token for testing with the same permissions you had. I created a new VM for testing and installed gist. Like you, I was able to list the gists, but when I tried to edit a gist (which involves cloning the repo), I got the same error as you.

I created a new ssh key for the VM and added it to my github account. After that I was able to edit the gists.

The confusing thing here is that you can list all of your gists, but you cannot edit them. This seems inconsistent. The reason this occurs is that listing the gists goes through the github API and, therefore, access is determined by the token. But editing/cloning the gists is done via git, so it has nothing to do with the access token.

Originally, access tokens did not expose the different scopes that are now available. One of the scopes that is now available is to read the users public keys. This may provide a mechanism for detecting this kind of problem from within gist so that the user can, at least, be provided a more helpful message.

0reactions
d9kcommented, Feb 21, 2018

@jdowner, cool, this works! Many thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Troubleshoot SSH Authentication Issues
Problems with SSH authentication includes permission denied with SSH keys and passwords.
Read more >
1 - Unix Stack Exchange
If the server's public key is not in ~/.ssh/known_hosts , then ssh prompts the user to ask whether to add the key. If...
Read more >
How to Fix SSH Not Working on MacOS Ventura - OSXDaily
Typically they'll see an error message when attempting to ssh into another server along the lines of “no matching host key type found....
Read more >
"Key is invalid" message on GitHub - Stack Overflow
(For the record, I used Putty Key Generator for my keys.) On the first line, enter ssh-rsa. When you copy/paste the key into...
Read more >
Troubleshooting SSH errors - Compute Engine - Google Cloud
The troubleshooting tool performs the following tests to check for the ... If OS Login is enabled on your project, your VM doesn't...
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