我正在使用 TeamCity 进行自动化测试,现在我想使用 Octopus 插件自动化我的部署。到目前为止,我可以使用我的 TeamCity 包手动从 octopus 服务器创建版本,但我想通过我的构建自动化它,并使跟踪我的项目版本变得更加容易。我已按照文档和视频中的说明进行操作:http: //docs.octopusdeploy.com/display/OD/TeamCity
我收到以下错误
八达通服务器错误(HTTP 401):您必须登录才能执行此操作。请提供有效的 API 密钥或重新登录。
我正在从我的个人资料中创建一个 API 密钥,不管管理员是否生成密钥我没有访问权限。我的 Octopus 版本是 2.5.7.384 和 TeamCity Enterprise 版本 8.1.2
这是构建日志:
Step 1/1: OctopusDeploy (OctopusDeploy: Create release)
[15:53:17][Step 1/1] Octopus Deploy
[15:53:17]Running command: octo.exe create-release --server http://nameofmyoctopusserver/ --apikey SECRET --project TCtest --enableservicemessages --version 44 --deployto Environment--waitfordeployment
[15:53:17]Creating Octopus Deploy release
[15:53:17]Octopus Deploy Command Line Tool, version 2.1.2.36
[15:53:17]
[15:53:18]Handshaking with Octopus server: http://nameofmyoctopusserver/
[15:53:18]Handshake successful. Octopus version: 2.5.7.384; API version: 3.0.0
[15:53:18]Finding project: TCtest
[15:53:18]Error from Octopus server (HTTP 401): You must be logged in to perform this action. Please provide a valid API key or log in again.
[15:53:18]Exit code: -7
[15:53:18]Octo.exe exit code: -7
[15:53:18][Step 1/1] Unable to create or deploy release. Please check the build log for details on the error.
[15:53:18][Step 1/1] Step OctopusDeploy (OctopusDeploy: Create release) failed
[15:53:18]Publishing internal artifacts
[15:53:18]Build finished