git clone 遇见问题:fatal: unable to update url base from redirection:

电玩女神 2022-09-14 15:29 54阅读 0赞

在使用git clone时遇见unable to update url base from redirection:问题,
在这里插入图片描述
解决方法:

1.使用账号和密码正确登录github

2.使用以下命令查看用户名,邮箱是否正确

  1. $git config user.name --->查看用户名
  2. $git config user.email --->查看邮箱
  3. $git config --global credential.helper store -->会生成一个.gitconfig文件用来保存信息,不需要每次操作都输入密码

3.配置ssh:将文件C:\Users\xxx.ssh下的id_rsa.pub的信息copy到git网页的ssh中的key里

4.如果是远程仓库地址发生变化导致,可以在.git的目录下使用命令查看配置,修改url

vim .git/config

在这里插入图片描述
5.查看是否使用代理:

  1. git config --global http.proxy
  2. git config --global --unset http.proxy //取消代理

6.第6种情况是博主自己遇到的,还是和代理有关,就是如果代理无访问权限或者代理无法连接外网,那么代码也是拉取不了的。我是在客户现场,然后拉取我们公司的项目拉取不了,原因是客户设置了代理不能访问外网。。。
解决方法就是不适用代理,和第5种情况解决方式一样。

  1. 设置
  2. git config --global https.proxy socks5://10.238.120.218:8889
  3. git config --global http.proxy socks5://10.238.120.218:8889
  4. 取消
  5. git config --global --unset http.proxy
  6. git config --global --unset https.proxy

原文连接:https://blog.csdn.net/a\_xixi/article/details/86572418

发表评论

表情:
评论列表 (有 0 条评论,54人围观)

还没有评论,来说两句吧...

相关阅读