简体   繁体   中英

Git SSH Key - not asking for SSH password

I'm having trouble accessing my gitlab repo through SSH.

When trying the connection through below line I get authenticated.

ssh -T git@gitlab.<mydomain>

But when trying to access through the lines below its not prompting for my SSH password.

PS ~> git clone git@gitlab.<mydomain>:<repo name>.git      
Cloning into '<repo name>'...
git@gitlab.<mydomain>'s password:
Permission denied, please try again.

The git remote -v seems to be correct:

origin  git@gitlab.<mydomain>:<repo name>.git (fetch)
origin  git@gitlab.<mydomain>:<repo name>.git (push)

Any more ideas on how to authenticate through SSH?

The first uses (Open)SSH's authentication scheme, which includes looking in the ~/.ssh directory for known SSH keys.

The second uses Gitlab's SSH authentication scheme, which requires you to add your public key through the Gitlab interface . It should be somewhere under Account Settings->Security->SSH keys.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM