今天发现一个很有意思的问题,使用git bash here 去拉取代码的时候,用clone with ssh或者是clone with http的链接都不好使,均报错,百思不得其解啊,为此还花了点时间.
报错信息分别如下:
LII@Lii MINGW64 /i/work/ ABCDcode
$ git clone http://7d8032432a52/mogu/code/mogu-back.git/
Cloning into ‘mogu-back’ …
fatal: unable to access ‘http://7d8032432a52/mogu/code/mogu-back.git/’ : Could not resolve host: 7d8032432a52
LII@Lii MINGw64 /i/work/ ABCDcode
$ git clone git@7d8032432a52:mogu/code/mogu-back.git
Cloning into ‘mogu-back’… .
ssh: Could not resolve hostname 7d8032432a52: Name or service not known
fatal: could not read from remote repository.
Please make sure you have the correct access rightsand the repository exists.
不知道是哪里有问题,估计是搭建私服的gitLab的时候有点问题吧?
最后发现,用浏览器地址栏的URL,直接去git bash here
输入命令+URL
git clone http:/127.0.0.1/mogu-back
成功拉取项目代码。
图片存在信息,没附上带有错误信息的贴图。