4

我正在使用TeamCity進行自動化測試,現在我想用Octopus插件自動化我的部署。截至目前,我可以使用TeamCity軟件包手動創建章魚服務器的發行版,但是我想用自己的版本將其自動化,並使跟蹤我的項目版本變得更容易。我按照從文檔中的指示,從視頻:http://docs.octopusdeploy.com/display/OD/TeamCityTeamCity Octopus Deploy Create Release無法讀取API密鑰

我收到以下錯誤

錯誤從八達通服務器(HTTP 401):你必須先登錄才能執行此操作。請提供有效的API密鑰或重新登錄。

我從我的配置文件創建一個API密鑰,並且無論管理員是否生成密鑰或沒有權限,都無關緊要。我的八達通版本2.5.7.384和TeamCity的企業版本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 

回答

8

這更是一個評論/問題的,但我沒有足夠的積分。

您是否確定複製包含「API-」在內的完整密鑰?我在過去遇到過這個問題,並發現這是問題所在。

祝你好運。

+0

這是很好的答案。 – Castrohenge 2014-09-06 13:52:39

+0

謝謝!這實際上是我的問題。現在我有一些版本問題,我可以自己弄清楚。 – 2014-09-08 14:48:34