git 提交401错误

  • Post author:
  • Post category:其他


git 401错误是没有权限,就是提交不上

因为 我本地有一个全局git账号是公司的,但是 我现在要提交的并不是公司账号所属的git

打开当前git项目中的 .git项目,打开config 文件

有一句是这样的

[remote “origin”]

url = http://47.xxx.xx.xxx:3000/xxxxx/data_collection

fetch = +refs/heads/*:refs/remotes/origin/*

改为

[remote “origin”]

url = http://

用户名:密码@

47.xxx.xx.xxx:3000/xxxxx/data_collection

fetch = +refs/heads/*:refs/remotes/origin/*

使用 用户名+密码提交就能提交成功了



版权声明:本文为Minstrel007原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。