Git allowed ssh cloning permission

I followed the instructions https://help.github.com/articles/generating-ssh-keys and typing

ssh -T git@github.com

I get a message

Hi username! You've successfully authenticated, but GitHub does not
# provide shell access.

When I try to clone a repository using ssh

git clone ssh://github.com/username/repository.git

I get

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

If i type

ssh-add -l

I see 3 keys attached with my email address (k1) and the other 2 inside ~/.ssh/id_rsa (RSA)(k2 and k3). key k3 matches k1

if i type

ssh -vT git@github.com

everything is fine ... the only line that makes me think is

debug1: Remote protocol version 2.0, remote software version libssh-0.6.0
debug1: no match: libssh-0.6.0
+4
source share
3 answers

git clone ssh://github.com/username/repository.gitwrong. You must do:

git clone ssh://git@github.com/username/repository.git

or better yet:

git clone git@github.com:username/repository.git
+8
source

This terribly vague error means the server rejected your connection. Github has very rich documentation -

https://help.github.com/articles/error-permission-denied-publickey

-

, GitHub. , . , SSH Github -

cd ~/.ssh && ssh-keygen cat id_rsa.pub

SSH - Github.

Git SSH, URL- ssh:// :

$ git clone ssh://user@server/project.git

scp- SSH:

$ git clone user@server:project.git

, URL- SSH Github -

enter image description here

+10

If this is a public repository, all the key things can be avoided by using the git protocol with the extraction url.

git clone git://github.com/username/repository.git
+1
source

Source: https://habr.com/ru/post/1541313/


All Articles