git各种方式拉取gitlab中的项目都报错?

1.本人用的是mac os,拉取github和码云上的项目完全没问题。

2.已经用了最新版的git。

3.用http拉取的时候报以下错:

git clone http://git.xxx.com/root/xxxxxx.git
正克隆到 'xxxx'...
fatal: unable to access 'http://git.xxx.com/root/xxxxx.git/': Maximum (20) redirects followed

4.用https拉取的时候报这个错:

git clone https://git.xxx.com/root/xxxxx.git
正克隆到 'xxxxx'...
fatal: unable to access 'https://git.xxx.com/root/xxxxx.git/': Failed to connect to git.xxx.com port 443: Connection refused

5.用ssh拉取的时候报这个错:

 git clone git@git.xxx.com:root/xxxxx.git
 正克隆到 'xxxxx'...
 ssh: connect to host git.xxx.com port 22: Operation timed out
 fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。

6.已经清过git的代理

7.能ping通gitlab,并且用其他机器拉取,所以肯定是本机的原因

看上面显示就是没有权限啊,需要授权

删除一下Windows中的凭证,可能以前凭证是错误的,它会保存,需要清理一下