致命:无法访问“ http://repo.***.com/***/***.git/”:请求的URL返回错误:504

时间:2019-10-21 15:30:39

标签: git git-push http-status-code-504 remote-repository

我可以通过浏览器访问自托管的Git存储库。但是,命令行上的git push会引发此错误:

$ git push origin m26.12.2--insert-auto-logic
fatal: unable to access 'http://repo.***.com/***/***.git/': The requested URL returned error: 504

到目前为止,尝试使用这些方法没有任何效果:

  1. 在Windows 10上尝试过Git Bash
  2. 将我的DNS服务器更改为1.1.1.18.8.8.8
  3. 在Linux上使用torproxychains
  4. 使用Windows 10命令提示符
  5. 尝试过this answer并使用Gi​​t代理
  6. 删除this post建议的Git凭据
  7. 尝试使用像this one这样的SSH

我还有什么可以做的吗?也许,我该如何使用this upload approach将提交推送到远程自托管的Git?在浏览器上浏览远程存储库时,我可以看到“新建/上传”按钮:

New/upload buttons on browser

2 个答案:

答案 0 :(得分:1)

尝试torsocks

torsocks git push <repository> <branch>

要检查Tor是否正常工作:

journalctl -exfu tor

在日志中,检查是否为Bootstrapped 100%。如果是这样,则什么都不做,否则:

  • 确保您拥有obfs4
  • here获取桥梁
  • sudo <your-favorite-editor> /etc/tor/torrc
  • torrc的末尾添加以下几行
UseBridges 1
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy
Bridge obfs4 IP:PORT HASH-OF-YOUR-OBFS4-BRIDGE
  • sudo systemctl restart tor.service
  • journal -exfu tor
  • 如果您可以看到Bootstrapped 100%,请什么都不做,否则请使用其他网桥

答案 1 :(得分:0)

在Windows 10上使用a system-wide VPN解决了问题。不知道为什么。