gitlab-登录账户遇到ERROR: Permission to XXX.git denied to user报错怎么办

in #cn6 years ago

碰到这个问题就意味着没有访问账户的权限,没有把访问电脑与访问账户用ssh_key关联起来,解决流程:

1、查看本地是否有ssh_key

笔者用的是git bash来输入命令

1
ls -al ~/.ssh
如果有id_rsa.pub的文件,说明可能是之前其他账户的ssh_key,把它删除掉(一般是在C:\Users.ssh,)

2、重新生成ssh_key

ssh-keygen -t rsa -C "[email protected]"
默认会在相应路径下(/your_home_path)生成id_rsa和id_rsa.pub两个文件

提示 enter passphrase时直接enter就行

3、将新生成的key添加到ssh-agent中

eval "$(ssh-agent -s)"
然后再输入
ssh-add

即可用本地电脑登录gitlab账户了

Sort:  

Congratulations @lza945! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.24
TRX 0.21
JST 0.036
BTC 98210.68
ETH 3384.50
USDT 1.00
SBD 3.43