GIT客户端无法正常下载代码可能原因

1.
首先安装完git 客户端之后,配置完 user.name 和user.email ,以及rsa秘钥

2.
添加到gitlab -->右上角-->setting-->SSH Keys 
 复制C:/user/xxx/.ssh/id_rsa.pub      并在SSH Keys ---->add key
 
3.
首先确认开通了gitlab对应仓库的权限

4.
 之后打开git base 
 执行git clone  [email protected]:IVI/Musella/PublicDoc.git  (例子)
 
5.
不出现错误最好,如果出现下面的错误 
~~~~~~~~~
Cloning into 'PublicDoc'...
ssh: connect to host 172.16.0.120 port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
~~~~~~~~~

6.
就采用http的方式
git clone https://172.16.0.120/IVI/Musella/PublicDoc.git(例子)

7.
出现错误
Cloning into 'PublicDoc'...
fatal: unable to access 'https://172.16.0.120/IVI/Musella/PublicDoc.git/': SSL certificate problem: self signed certificate

8.
进行config配置
git config --global http.sslVerify false

9.
在进行
git clone https://172.16.0.120/IVI/Musella/PublicDoc.git(例子)

10.OK!
git clone https://172.16.0.120/IVI/Musella/PublicDoc.git
Cloning into 'PublicDoc'...
remote: Counting objects: 482, done.
remote: Compressing objects: 100% (356/356), done.
remote: Total 482 (delta 145), reused 463 (delta 126)
Receiving objects: 100% (482/482), 397.68 MiB | 1.48 MiB/s, done.
Resolving deltas: 100% (145/145), done.
Checking out files: 100% (359/359), done.

你可能感兴趣的:(Utils—工具类【整理】,Android进阶,git)