git/info/refs not found: did you run git update-server-info on the server
最近在本地服务器用git拉取本地gitLab项目部署到本地环境,运到的问题
第一个问题:
Enter passphrase for key '/root/.ssh/id_rsa': 提示输入私钥
初认为是公钥没添加到gitLab,但是添加后还是不行
使用ssh-agent 代理
ssh-agent就是一个密钥管理器,运行ssh-agent以后,使用ssh-add将私钥交给ssh-agent保管,其他程序需要身份验证的时候可以将验证申请交给ssh-agent来完成整个认证过程
启动方式:ssh-agent $SHELL
然后使用ssh-add /roor/.ssh/id_rsa 添加你的私钥
第一个问题解决了 再次执行git clone 命令 不再提示输入私钥了 没设置密码的话 password 可以直接按enter 略过
password 略过后 第二个问题还在
git/info/refs not found: did you run git update-server-info on the server
google 查找答案
在自己的git 项目的配置文件里的url是否正确 ,
打开gitlab git项目
进入 crm-h5.git/config
打开自己的项目没有remote
尝试添加进去
ok 可以clone
转载请注明:微刻 blog.wecot.cn » 本地环境 git clone 出现的问题