[英]git push error - fatal: the remote end hung up unexpectedly error: RPC failed; HTTP 401 curl 22 the requested URL returned error: 401
This has completely stumped me.这已经完全难倒我了。 It only occurs when trying to push individual files > 1MB
它仅在尝试推送单个文件 > 1MB 时发生
IC# program that is running on a remote server.在远程服务器上运行的 IC# 程序。 The program creates a process and runs a .bat file in cmd.exe.
该程序创建一个进程并在 cmd.exe 中运行一个 .bat 文件。
The .bat file contains basic git commands, it simply checks out a branch, adds files, commits, then pushes .bat 文件包含基本的 git 命令,它只是检出一个分支,添加文件,提交,然后推送
git checkout QA git 结帐 QA
git config --global --unset http.postBuffer (added for troubleshooting, doesnt fix issue..) git config --global --unset http.postBuffer(添加用于故障排除,不解决问题..)
git config --global http.postBuffer 157286400 (added for troubleshooting, doesnt fix issue..) git config --global http.postBuffer 157286400(添加用于故障排除,不解决问题..)
git add config .txt git 添加配置.txt
git add *.sql git add *.sql
git add *.out git add *.out
git commit -a -m "Resolve Poll" git commit -a -m "解决投票"
git push推
I am using Azure Devops to run this program as a build on the remote server and when it goes to do the git push it returns我正在使用 Azure Devops 将此程序作为远程服务器上的构建运行,当它执行 git push 时它返回
fatal: the remote end hung up unexpectedly fatal: the remote end hung up unexpectedly error: RPC failed;致命:对端意外挂断 致命:对端意外挂断 error:RPC失败; HTTP 401 curl 22 the requested URL returned error: 401
HTTP 401 curl 22 请求的 URL 返回错误:401
but when i log into the server myself and run the .bat file by double clicking all the git commands run to success without error, even for pushing files > 1MB但是当我自己登录服务器并通过双击运行 .bat 文件时,所有 git 命令都成功运行而没有错误,即使推送文件 > 1MB
What could this be?这可能是什么?
Things i've tried我尝试过的事情
Updated GIT for version 2.25更新了 2.25 版的 GIT
Increased http.postBuffer size增加 http.postBuffer 大小
git pushed with username pass in url使用 url 中的用户名传递的 git 推送
used both 'store' and 'manager' methods of git config --global credential.helper使用了 git config --global credential.helper 的“store”和“manager”方法
The HTTP 401 error (Unauthorized) means you're missing credentials or the credentials you're using aren't valid. HTTP 401 错误(未经授权)意味着您缺少凭据或您使用的凭据无效。 You'll need to figure out what credentials are needed and provide them, usually with a credential helper.
您需要弄清楚需要哪些凭据并提供它们,通常使用凭据助手。
It may be the case that when you log into the server, your credentials are delegated (say, if you're using Kerberos or NTLM), whereas those credentials are not present when the server is running noninteractively.可能的情况是,当您登录服务器时,您的凭据已被委派(例如,如果您使用的是 Kerberos 或 NTLM),而当服务器以非交互方式运行时,这些凭据不存在。 You could consider issuing an access token or OAuth token of some sort to the server if you can't use anything else.
如果您不能使用其他任何东西,您可以考虑向服务器发出某种类型的访问令牌或 OAuth 令牌。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.