git push 在远程服务器上产生有关代理进程 ID 的未知错误

标签 git ubuntu

我正在尝试使用 ubuntu 服务器从本地推送到远程 git 存储库

git push production master 

我不断收到此错误消息
fatal: protocol error: bad line length character: Agen

fatal: The remote end hung up unexpectedly

所以我做了
ssh <hostname> git-receive-pack <path-to-git-repo>

它给了我这个错误
Agent pid 17671
008c0000000000000000000000000000000000000000 capabilities^{} report-status 
delete-refs side-band-64k quiet atomic ofs-delta agent=git/2.7.4
0000

最佳答案

这是典型的 ssh 连接,它会在标准输出中打印一些内容。
例如,在 Ubuntu 服务器上使用的远程帐户有 .basrch.profile其中有回声。

确保 ssh -T <account>@<ubuntu.server>不打印任何东西。

例如,如果该帐户自己设置了一个 ssh 代理(如“Why eval the output of ssh-agent?”中),则将打印 ssh 代理 pid。

尽量避免这种情况,特别是考虑到 ssh 代理更适合客户端(我为了缓存 ssh 私钥密码)

关于git push 在远程服务器上产生有关代理进程 ID 的未知错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45528918/

相关文章:

linux - git:确定是否有文件不在 repo 协议(protocol)中,但应该添加

Git 强制推送语法, "-f"与 "+branch"

android - 向开源项目提交更改的海关?

php - 在apache服务器上通过php执行bash文件

没有 RVM 的 Ruby + Ubuntu:执行 gem 时...(Gem::FilePermissionError)

git - git 克隆中丢失的文件

ubuntu - Texmaker 不在 Ubuntu 上编译 latex 文档

macos - BSD grep "?"GNU 通配符替代方案

linux - phpinfo 页面 saprfc 模块未显示

java - 查找当前用户的路径