How can we configure TeamCity to use our proxy IP and username/password?


I asked following question to teamcity-feedback@jetbrains.com

Our TeamCity server is sitting in our corporate environment. We now need our build agents to contact public repositories (ie: nuget, github, etc).

Our corporate policy is all outbound traffic must run through a proxy.

How can we configure TeamCity to use our proxy IP and username/password?

TeamCity server : Enterprise TeamCity  8.1 , ( running as windows service. ) we have enterprise Licence for TeamCity.
OS: Installed on Windows Server 2008



they replied with

this answer :

Yes, TeamCity can use proxy server for outgoing connections. There are no special settings in UI, but TeamCity is a Java application, so these options can be specified using a common Java approach.

Create <TeamCity>\bin\teamcity-init.bat file with the following content:
set TEAMCITY_SERVER_OPTS=%TEAMCITY_SERVER_OPTS% -Dproxyset=true ^
  • Dhttp.proxyHost=proxy.domain.com ^
  • Dhttp.proxyPort=8080 ^
  • Dhttp.nonProxyHosts=domain.com ^
  • Dhttps.proxyHost=proxy.domain.com ^
  • Dhttps.proxyPort=8080 ^
  • Dhttps.nonProxyHosts=domain.com

Change host and port values to match your network.
The variable should be specified as a single string. "^" sign helps split the lines.

I need to know How do I pass credentials(username and password)


Thanks,

Nikhil
1 comment
Comment actions Permalink
User Name and Password can be passed as ( from response from teamcity-feedback@jetbrains.com)


  • Dhttp.proxyUser=someUserName
  • Dhttp.proxyPassword=somePassword


updated here so it can be helpful to some one.
0

Please sign in to leave a comment.