We are seeing the Azure DevOps Create Release step returning 401 Unauthorized for a single channel in a project. Things like pushing packages, creating a release for a different channel in the project and creating released in other projects (they only have a single channel) all are working correctly. They all share the same service reference with the same API key.
We have been using this forever without any issues. It worked last week and nothing has changed between now and then that we are aware of.
Here is some more information related to the problem:
We are running the step on a hosted agent on a VM in Azure. Looking at the source for the step, it appears to be failing when it attempts to get the Work Items associated with the build from VSTS.
Create step logs:
2018-12-19T14:35:29.5791716Z ##[section]Starting: Create Octopus Release
2018-12-19T14:35:29.5948154Z ==============================================================================
2018-12-19T14:35:29.5948154Z Task : Create Octopus Release
2018-12-19T14:35:29.5948154Z Description : Create a Release in Octopus Deploy
2018-12-19T14:35:29.5948154Z Version : 2.0.135
2018-12-19T14:35:29.5948154Z Author : Octopus Deploy
2018-12-19T14:35:29.5948154Z Help : Version: 2.0.135. More Information
2018-12-19T14:35:29.5948154Z ==============================================================================
2018-12-19T14:35:30.7198189Z Environment = Bitbucket
2018-12-19T14:35:30.7198189Z Comments = True, WorkItems = True
2018-12-19T14:35:31.3603727Z ##[error]The remote server returned an error: (401) Unauthorized.
2018-12-19T14:35:31.3760188Z ##[section]Finishing: Create Octopus Release
You may be able to resolve this issue by upgrading to version 3 of the TFS plugin. You can use the new version of the plugin by selecting it from the Version drop down box.
I have tracked down the issue to the fact that we use an external git repo (bitbucket) and VSTS is returning truncated change messages, and I think the plugin is expecting to talk to VSTS not an external repo for the full message.
I upgraded to version 3 and I’m getting the following error message. We are running our own server for agents, so I am guessing I am missing a requirement, but I don’t know what.
Figured out that we needed .NET Core 2.0 or greater to be installed on the server. Installing that fixed the 3.0 issue and we are back to creating releases.
Does anyone know how to get .NET Core to show up as a capability for the agent?
You can add the .NET Core SDK Installer step to ensure the build agents have the appropriate .NET Core runtime available. This step will download and place the DotNET Core SDK or runtime on the path if it is not already available.