美文网首页
git已经配置好ssh,clone时还是需要密码

git已经配置好ssh,clone时还是需要密码

作者: 不懒狮Blaise | 来源:发表于2017-09-21 20:15 被阅读0次

发现自己在服务端并没有把公钥加到.ssh/authorized_keys.
我尝试着把pub秘钥加入要文件中,不过发现加了后还是不能clone.
我过会想到了是自己没有git config配置用户等步骤。
现在我要开始配置用户了:

git config --global user.name  "your account"
git config --global user.email "your email"

进过验证,配置账号和email后可以进行clone了,
这个时候需要输入账号密码,就是你的gitlab账号密码
你也可以进行临时缓存密码

git config --global credential.helper cache

如果想一直保存密码

git config credential.helper store

之后如果想上传,那么需要先执行remote操作
下期再续

相关文章

网友评论

      本文标题:git已经配置好ssh,clone时还是需要密码

      本文链接:https://www.haomeiwen.com/subject/lkptextx.html