Wrong Git Clone URL When Using Proxy
症状
When accessing a repository, the Git clone URL (default URL) should use the Stash URL (example: http://localhost:7990):
git clone http://USER@127.0.0.1:7990/git/PROJECT/REPOSITORY.git
This is not the case when Stash is behind a proxy.
原因
The proxy is translating the URL to a local URL, so Stash uses that address to show the clone URL.
The bug report describing this behavior in more detail can be found here: - STASH-2535Getting issue details... STATUS
ソリューション
Update the connector settings in
<Stash Installation Directory>/conf/server.xml
file to reflect the proxy settings from:
<Connector port="7990" protocol="HTTP/1.1"
connectionTimeout="20000"
useBodyEncodingForURI="true"
redirectPort="8443"
compression="on"
compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"/>
変更後:
<Connector port="7990" protocol="HTTP/1.1"
connectionTimeout="20000"
useBodyEncodingForURI="true"
redirectPort="8443"
compression="on"
proxyName="myproxy.company.com"
proxyPort="PORT_NUMBER"
compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"/>
And restart Stash.
最終更新日: 2016 年 2 月 26 日
Powered by Confluence and Scroll Viewport.