Can't clone the repositories: permission denied #64199
-
I just added an SSH public key to my account and tested the SSH connection while everything works fine. But cloning the repositories is not allowed which does not make sense. I tried to search the web with no luck. Here is the output:
Probably useful info:
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 4 replies
-
You’re accessing GitHub through SSH. First generate an SSH key pair; then add the public key to GitHub. Generate key pair, github prefers the "Ed25519 algorithm"
|
Beta Was this translation helpful? Give feedback.
-
I’m not sure but you may need to use a key with secure shell. Or you might have a firewall or proxy on. If this still doesn’t work. Go to respitory, check settings and go to keys. Make sure permission is enabled. |
Beta Was this translation helpful? Give feedback.
-
As the problem is not easy to understand for me, I got the trace of
That's the part which I think is important. And here is those of
which I think just does not make sense. |
Beta Was this translation helpful? Give feedback.
-
@nirav-gajera I expect there is a logical answer to this such as your "git" command picking up or configured to use the a local SSH key not added to your GitHub profile. try this updated command You can then look to see what keys are being offered, including the one you can see in your SSH -vT key test that the server accepted "Offering public key: bians@surface ED25519 SHA256:Oe34YXTohlLX2fQHVp1dy3OM0t2XhnvM82m9gwmf/XM agent" You could also check your local git and SSH config files for anytihng non default |
Beta Was this translation helpful? Give feedback.
-
As we can see |
Beta Was this translation helpful? Give feedback.
-
As |
Beta Was this translation helpful? Give feedback.
-
Host value should be OpenSSH will only try to match ' If config file works right, you will find a line in the verbose mode output right after 'Reading configuration data' to tell you the option is applied.
This is my config around GitHub:
With I'm not sure the reason your
I don't quite understand what There is an 'agent' at the end of that line of output, it may be a private key managed by ssh-agent (not sure). Did you upload to GitHub the same key that you use to log into a host named 'surface'? And you probably manage the private key with ssh-agent when you configure a remote access to 'surface'. (Since some tutorials on the internet might recommend using ssh-agent ) Or you upload multiple keys to GitHub, while 'bians@surface' is one of them. |
Beta Was this translation helpful? Give feedback.
@HeavySnowJakarta
Host value should be
github.com
or[email protected]
, that will make OpenSSH apply the specified option in the config file when git trying to access[email protected]
.OpenSSH will only try to match '
Host
' value which can be any string and will represent a set of options defined below it. According to your config file,git clone project:HeavySnowJakarta/spacedrive.git
should work.If config file works right, you will find a line in the verbose mode output right after 'Reading configuration data' to tell you the option is applied.
This is my config around GitHub: