microsoft/tfs-cli

--auth-type basic ask for personal access token

Nusserdt opened this issue · 1 comments

When I execute

tfx.cmd extension publish --json --no-color --service-url https://my-server.de/ --auth-type basic --username Myuser --password *** --vsix Pub.MyPackage-1.0.2.gen.vsix --debug-log-stream stderr

the tfx-cli returns:

error: Received response 401 (Not Authorized). Check that your personal access token is correct and hasn't expired.

I can confirm that my passed credentials are valid. Anyway I would expect that the error tells me something about a basic auth issue, not about a personal access token what I would expect when I use --auth-type pat.

Do --auth-type basic works correct?

Hi @Nusserdt this error means that there is 401 response code from server - looks like something went wrong during authentication. Do you use on-prem server? Do you have basic authentication enabled for this? Is there something in your network which could block it?
Regarding error messages - yes, looks like we can improve error message depending on authentication type - let me leave it for such fix.