当前位置: 首页 > 工具软件 > PushServer > 使用案例 >

使用git提交代码:push时报错HTTP 401

罗梓
2023-12-01

1.问题描述:

git代码可以commit可以pull但是push异常,异常如下:
Push failed
Delta compression using up to 2 threads.
Total 151 (delta 81), reused 0 (delta 0)
The remote end hung up unexpectedly
The remote end hung up unexpectedly
RPC failed; result=22, HTTP code = 401

2.问题分析:

HTTP 401是验证问题,一般都是git配置文件中的url有误

3.解决方法

到git本地仓库根目录,使用命令vi .git/config 修改配置文件中的url,先将url中的用户名密码移除,保存,手动输入用户名密码push代码,成功push,再讲用户名密码加上,好了!

 类似资料: