External SVN and auto build

I have a project that uses external SVNs to include some things (in fact, these are MSBuild community tasks, but tangential). The external repository requires the username "guest", but no password.

I set the externals property, and it works fine when updating SVN locally. The problem occurs when the TeamCity integrated integration build is performed. TeamCity tries to check sources and throttle external ones because it does not know the username.

I tried to define external elements as a separate SVN root in TeamCity, but this does not work, so I do not think this is a solution.

So how do I do this job? How do I tell TeamCity that it needs to enter an external SVN repo?

+4
source share
5 answers

If a password is not required, specify only the username, which you can easily set in the servers configuration file (on Windows it is located in %APPDATA%\Subversion\servers ).

Specify the server, and then set the "username" option. For instance:

 [groups] communitytasks = *.comunityserver.com [communitytasks] username = guest 
+4
source

Authentication information is stored in a configuration file local to the user running the program. Or at least it can be configured for this.

I am sure that the TeamCity Agent program runs under a different user than the one you are logging into with. If so, try just logging in with the same user, and then enter svn checkout in the temporary directory and enter the username and password. This will be cached, and so when TeamCity launches SVN under the same user, it must reuse this information.

+2
source

TeamCity uses cached authentication information from the SVN client to access external files. There is no other way to specify external authentication information other than access to the remote server from the command line client, cache credentials locally and use their TeamCity (TeamCity has a flag in the SVN settings whether to use the saved SVN settings)

+2
source

Not defined for TeamCity, but if you need to specify which username to use when checking the svn:externals repository:

Do not specify a username in the svn:externals property:

 the_vendor_dir svn+ssh://hostname/path/to/repo 

By default, statements will use the current username of the user. To use a different username:

 ~/.subversion/config: [tunnels] ssh = $SVN_SSH ssh -ljdoe 

This will cause Subversion to use jdoe as the username for any svn+ssh tunnel that does not specify a username.

Instead of changing the svn+ssh tunnel at the Subversion level, you can also change it at the SSH level:

 ~/.ssh/config: Host svn.example.com User jdoe 

Stefan's answer above ~/.subversion/servers did not work for me, and it seems that it should not work, since the username parameter is not documented in this file.

+1
source

I have never used TeamCity, but used other CI tools.

Instead of polling TeamCity, svn repository for new changes. Maybe there is a message fixing hook that calls TeamCity, but before you do this, run ant script so that svn updates the local directory on the TeamCity server. The first time you check this directory, you should be able to install external ones.

0
source

All Articles