在其他电脑上,使用gitlab

版权声明:www.gudianxiaoshuo.com (古典小说网) 今日头条号: 古典古韵古典小说、讨厌编程 https://blog.csdn.net/shuilan0066/article/details/88529696

把项目整个拷贝过去了,包括 .git,  但是在pull显示密码错误

原因:

         .git 拷贝过去后,公钥是一样的,但是私钥没有

          或者重新产生公钥私钥

          ssh-kengen.exe -t rsa

          私钥一般保存在c/user/user/.ssh/  将id_rsa、id_rsa.pub 拷贝到另外一个电脑的相应位置就可以了

或者采用密码的方式

cat .git/config

获得git 配置信息

其中的URL 改成, 

这样提交或拉取时,输入gitlab中的密码

              

猜你喜欢

转载自blog.csdn.net/shuilan0066/article/details/88529696