Publish an Azure DevOps extension from command line fails with 401
Asked Answered
R

1

5

I develop an Azure DevOps extension. Now I want to automate the publishing process. Here the journey begins ... Following the theory here the reality looks different to me.

For me every trial of publish via command line ends in

tfx extension publish --auth-type pat -t 
7dblablablablablablablablazq --share-with examplecompany0123

TFS Cross Platform Command Line Interface v0.6.3
Copyright Microsoft Corporation
Checking if this extension is already published
It isn't, create a new extension.
error: Received response 401 (Not Authorized). Check that your personal 
access token is correct and hasn't expired.

My first guess on that error message 401 was that I probably have a wrong PAT. A look in my PAT management showed me that everything seems good.

My PAT management

So, now I am confronted like a cow at a five-barred gate. I just don't get the root of the failure. Anyone here who already has left this noob beginner problems behind and reached the next level and can help me?

Ruching answered 2/12, 2018 at 11:56 Comment(0)
D
10

Ensure your PAT have Account: 'All accessible organizations'.

Dicentra answered 18/1, 2019 at 12:26 Comment(1)
Thanks! This did the trick for me. I only had to do this and set the "Marketplace: Publishing" option and it got it working.Boyes

© 2022 - 2024 — McMap. All rights reserved.