【问题标题】:TeamCity Octopus Deploy Create Release cannot read API keyTeamCity Octopus Deploy Create Release 无法读取 API 密钥
【发布时间】:2014-10-30 18:08:26
【问题描述】:

我正在使用 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

【问题讨论】:

    标签: teamcity automated-tests teamcity-8.0 octopus-deploy automated-deploy


    【解决方案1】:

    这更像是一个评论/问题,但我没有足够的积分。

    您是否确保复制了完整的密钥,包括前面的“API-”?我过去遇到过这个问题,发现这是问题所在。

    祝你好运。

    【讨论】:

    • 这是一个很好的答案。
    • 谢谢!这实际上是我的问题。现在我有一些版本控制问题,我可以自己解决。
    猜你喜欢
    • 2018-07-03
    • 2014-01-23
    • 1970-01-01
    • 1970-01-01
    • 2020-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多