我们在客户端上使用带有tortoiseSVN的visualsvn来进行二进制文件的版本控制。也就是说,当我们想要测试项目时,测试分支与构建分支合并。这实际上将jar文件更新为更新版本。
由于某种原因,我无法提交现在合并的测试分支,我收到502'Bad Gateway'错误。 我可以提交一些更新的文件,我已经删除了旧的jar文件,但我无法提交新的jar。
我得到的错误指向构建分支,而不是测试分支,我认为可能是原因。我已经尝试删除有问题的文件并将其替换为构建中的副本(类似于手动合并)。但是我得到了同样的错误。
Commit failed (details follow):
Unexpected HTTP status 502 'Bad Gateway' on
'/svn/binaries/!svn/rvr/11730/myProject/branches/build/newestversion.jar'
编辑:错误与合并有关。在撤消 add 之后,我已经将jar文件复制到测试目录中,添加它并在没有任何操作的情况下提交。
错误传播:在将测试与测试合并后,我得到与上面相同的错误但是:
'/ SVN /二进制/!SVN / RVR / 11737 / myProject的/分支机构/的 TST /newestversion.jar'
答案 0 :(得分:1)
根据对support@visualsvn.com的调查,根本原因是%VISUALSVN_SERVER%conf\httpd-custom.conf
文件中的以下行:
RequestHeader edit Destination ^https http early
删除此行即可解决问题。
顺便说一句,我可以猜想这行是为了实现从HTTP到HTTPS的自动重定向而添加的。使用现代的VisualSVN Server版本,您可以通过VisualSVN Server Manager控制台启用此重定向。因此,无需将该行添加到conf文件中。
您可以按照以下步骤操作:
答案 1 :(得分:0)
HTTP status code 502 is a server side error:
The 502 (Bad Gateway) status code indicates that the server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
As you are checking in binary files it could be a timeout from a server between you and the svn servern as the checking takes too long. So you should check the svn server and any server between you and the svn server.
答案 2 :(得分:0)
在我的情况下,我使用的是 RouixSVN ,我只需清除计算机上的SVN 身份验证数据,然后再次登录并有效。希望对别人有帮助。
在Ubuntu系统上,这是通过删除来完成的:
~/.subversion/auth
在Windows上:
%APPDATA%\Subversion\auth
答案 3 :(得分:0)
我解决了这个问题。我看到的问题是分支要求进行SVN COPY,并且此过程在HTTP中完成,并在HTTPS下中断。因此,我创建了一个运行DAV的localhost:9005虚拟主机,添加了localhost:9005列表器,并将我的SSL虚拟主机更改为代理到localhost:9005。
... SSLCertificateFile /etc/ssl/certs/server.cer SSLCertificateKeyFile /etc/ssl/certs/server.key SSLCertificateChainFile /etc/ssl/certs/domain.cerProxyRequests On
ProxyPreserveHost On
ProxyPass /svn http://localhost:9005/svn
ProxyPassReverse /svn http://localhost:9005/svn