API key for TeamCity (/ other CI)

When scheduling builds from TeamCity, it’s a bit strange to use a user-based API key for each build. It would be nicer to have a “global” API key.

Also, the NuGet TeamCity runner requires an API key to be entered for each build step: it would be better to be able to pull this out of a global variable (e.g. system.octopus.apiKey) in environments where keys can be shared.

Hi Andy,

Thanks for your suggestions.

We provide API keys on a per-user basis because then you can set permissions for the user/group that the user belongs to. If you had a global API key, then anyone who knew that key could use it to deploy any app to any environment, when you might prefer it to only give them access to deploy a specific app to specific environments. The assumption is you could create a fake user called “TeamCity” in this case and use it’s API key.

I’ll try to find out if there’s a way to accommodate your second suggestion about sharing the API key at a project level.


Hi Paul,

Great point about having a TeamCity user account: that does make a lot more sense than what I described (and in retrospect, is quite obvious)!

Thanks for looking to project-level API keys.