问题
gitlab上新建了一个项目,结果拉取时报错:
> git clone -b develop http://xxxxxxx:xxx/xxx.git .
Remote branch develop not found in upstream origin
> git clone -b develop git@xxxxxxxx:xxx/xxx.git .
fatal: Could not read from remote repository. Please make sure you have the correct access rights
解决
- 检查分支和地址是否存在 —— 确实存在
- 怀疑是ssh key失效了,重新生成—— 但是发现同一个gitlab服务器下的其他项目可以正常拉取
- 卸载重装gitbash —— 成功
猜测是gitlab缓存导致,windows下没找到缓存位置,所以干脆卸载重装