Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to store PAT using keyring; falling back to file storage. #26731

Open
shileshbabu opened this issue Jun 22, 2023 · 25 comments
Open

Failed to store PAT using keyring; falling back to file storage. #26731

shileshbabu opened this issue Jun 22, 2023 · 25 comments
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. DevOps needs-team-attention This issue needs attention from Azure service team or SDK team Service Attention This issue is responsible by Azure service team. Similar-Issue
Milestone

Comments

@shileshbabu
Copy link

Describe the bug

Hi Team,
I am facing the below issue while logging to az devops.. pls check and help me out....
a-> Added the PAT with full access.
Generate a Personal Access Token with Packaging read & write scopes.
b-> copy the token key to my_pat_token.txt file
c-> export the path
#export azure_devops=$(cat my_pat_token.txt)
d-> run the loggin cmd
#echo $azure_devops | az devops login --organization https://dev.azure.com/WWgroup/
Failed to store PAT using keyring; falling back to file storage.
You can clear the stored credential by running az devops logout.
Refer https://aka.ms/azure-devops-cli-auth to know more on sign in with PAT.

Azure tools and utilities version pls see below
#az --version
azure-cli 2.49.0

core 2.49.0
telemetry 1.0.8

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Python location '/opt/az/bin/python3'
Extensions directory '/home/wwserviceadmin/.azure/cliextensions'

Python (Linux) 3.10.10 (main, May 19 2023, 08:20:31) [GCC 11.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Please check and let me know if there any further information need to be added,thanks.

Regards,
Shilesh

Related command

az devops login --organization https://dev.azure.com/WWgroup/

Errors

Failed to store PAT using keyring; falling back to file storage.
You can clear the stored credential by running az devops logout.
Refer https://aka.ms/azure-devops-cli-auth to know more on sign in with PAT.

Issue script & Debug output

.com"}},"resourceVersion":2,"metaTypeId":1},"instanceId":"70abfbfb-51f6-485c-8d7f-ed8031f90290","deploymentId":"917a458e-1d30-b5
3d-ff6e-6b3ef9f8a0de","deploymentType":"hosted","locationServiceData":{"serviceOwner":"00025394-6065-48ca-87d9-7f5672854ef7","defaultAcc
essMappingMoniker":"PublicAccessMapping","lastChangeId":245633076,"lastChangeId64":245633076}}'
keyring.backend: Loading KWallet
keyring.backend: Loading SecretService
keyring.backend: Loading Windows
keyring.backend: Loading chainer
keyring.backend: Loading macOS
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Failed to store PAT using keyring; falling back to file storage.
cli.azext_devops.dev.common.credential_store: You can clear the stored credential by running az devops logout.
cli.azext_devops.dev.common.credential_store: Refer https://aka.ms/azure-devops-cli-auth to know more on sign in with PAT.
cli.azext_devops.dev.common.credential_store: Keyring failed. ERROR :No recommended backend was available. Install the keyrings.alt pack
age if you want to use the non-recommended backends. See README.rst for details.
cli.azext_devops.dev.common.credential_store: Storing credentials in the file: /home/czsmartserviceadmin/.azure/azuredevops/personalAcce
ssTokens
cli.azext_devops.dev.team.credentials: Another organization is already set as default.
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fa6885b6c20>, <function _x509_from_bas
e64_to_hex_transform at 0x7fa6885b6cb0>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fa68856ee60>]
az_command_data_logger: exit code: 0
cli.main: Command ran in 0.618 seconds (init: 0.180, invoke: 0.438)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3314 in cache

Expected behavior

az devops loggin should happen

Environment Summary

#az --version
azure-cli 2.49.0

core 2.49.0
telemetry 1.0.8

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Python location '/opt/az/bin/python3'
Extensions directory '/home/wwserviceadmin/.azure/cliextensions'

Python (Linux) 3.10.10 (main, May 19 2023, 08:20:31) [GCC 11.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@shileshbabu shileshbabu added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 22, 2023
@ghost ghost added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jun 22, 2023
@azure-client-tools-bot-prd
Copy link

Hi @shileshbabu
Find similar issue #25138.

Issue title Failed to store PAT using keyring, az devops cli
Create time 2023-01-16
Comment number 1

Please confirm if this resolves your issue.
Kindly react a 👍 or 👎 to this comment so that we can improve this robot.

@ghost ghost added the Auto-Assign Auto assign by bot label Jun 22, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 22, 2023

Thank you for opening this issue, we will look into it.

@ghost ghost added the CXP Attention This issue is handled by CXP team. label Jun 22, 2023
@ghost ghost assigned jiasli Jun 22, 2023
@ghost ghost added this to the Backlog milestone Jun 22, 2023
@navba-MSFT navba-MSFT added Service Attention This issue is responsible by Azure service team. needs-team-attention This issue needs attention from Azure service team or SDK team and removed CXP Attention This issue is handled by CXP team. labels Jun 23, 2023
@ghost
Copy link

ghost commented Jun 23, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @v-anvashist, @V-hmusukula.

Issue Details

Describe the bug

Hi Team,
I am facing the below issue while logging to az devops.. pls check and help me out....
a-> Added the PAT with full access.
Generate a Personal Access Token with Packaging read & write scopes.
b-> copy the token key to my_pat_token.txt file
c-> export the path
#export azure_devops=$(cat my_pat_token.txt)
d-> run the loggin cmd
#echo $azure_devops | az devops login --organization https://dev.azure.com/WWgroup/
Failed to store PAT using keyring; falling back to file storage.
You can clear the stored credential by running az devops logout.
Refer https://aka.ms/azure-devops-cli-auth to know more on sign in with PAT.

Azure tools and utilities version pls see below
#az --version
azure-cli 2.49.0

core 2.49.0
telemetry 1.0.8

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Python location '/opt/az/bin/python3'
Extensions directory '/home/wwserviceadmin/.azure/cliextensions'

Python (Linux) 3.10.10 (main, May 19 2023, 08:20:31) [GCC 11.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Please check and let me know if there any further information need to be added,thanks.

Regards,
Shilesh

Related command

az devops login --organization https://dev.azure.com/WWgroup/

Errors

Failed to store PAT using keyring; falling back to file storage.
You can clear the stored credential by running az devops logout.
Refer https://aka.ms/azure-devops-cli-auth to know more on sign in with PAT.

Issue script & Debug output

.com"}},"resourceVersion":2,"metaTypeId":1},"instanceId":"70abfbfb-51f6-485c-8d7f-ed8031f90290","deploymentId":"917a458e-1d30-b5
3d-ff6e-6b3ef9f8a0de","deploymentType":"hosted","locationServiceData":{"serviceOwner":"00025394-6065-48ca-87d9-7f5672854ef7","defaultAcc
essMappingMoniker":"PublicAccessMapping","lastChangeId":245633076,"lastChangeId64":245633076}}'
keyring.backend: Loading KWallet
keyring.backend: Loading SecretService
keyring.backend: Loading Windows
keyring.backend: Loading chainer
keyring.backend: Loading macOS
cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.fail.Keyring (priority: 0)
cli.azext_devops.dev.common.credential_store: Failed to store PAT using keyring; falling back to file storage.
cli.azext_devops.dev.common.credential_store: You can clear the stored credential by running az devops logout.
cli.azext_devops.dev.common.credential_store: Refer https://aka.ms/azure-devops-cli-auth to know more on sign in with PAT.
cli.azext_devops.dev.common.credential_store: Keyring failed. ERROR :No recommended backend was available. Install the keyrings.alt pack
age if you want to use the non-recommended backends. See README.rst for details.
cli.azext_devops.dev.common.credential_store: Storing credentials in the file: /home/czsmartserviceadmin/.azure/azuredevops/personalAcce
ssTokens
cli.azext_devops.dev.team.credentials: Another organization is already set as default.
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fa6885b6c20>, <function _x509_from_bas
e64_to_hex_transform at 0x7fa6885b6cb0>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fa68856ee60>]
az_command_data_logger: exit code: 0
cli.main: Command ran in 0.618 seconds (init: 0.180, invoke: 0.438)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3314 in cache

Expected behavior

az devops loggin should happen

Environment Summary

#az --version
azure-cli 2.49.0

core 2.49.0
telemetry 1.0.8

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Python location '/opt/az/bin/python3'
Extensions directory '/home/wwserviceadmin/.azure/cliextensions'

Python (Linux) 3.10.10 (main, May 19 2023, 08:20:31) [GCC 11.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Author: shileshbabu
Assignees: -
Labels:

bug, Service Attention, customer-reported, DevOps, needs-team-attention, Auto-Assign, Auto-Resolve, Similar-Issue

Milestone: Backlog

@maldamiri
Copy link

maldamiri commented Jul 9, 2023

@yonzhan @v-anvashist @V-hmusukula, we are facing the same issue, any update please? it was working fine

@maldamiri
Copy link

maldamiri commented Jul 10, 2023

Hi @shileshbabu , have you find a solution for this issue ?

@Arvindgade
Copy link

Arvindgade commented Jul 11, 2023

Hi @maldamiri, we tried to repro the issue, but we are unsuccessful.
we are successfully login with PAT using below two methods.
1.cat my_pat_token.txt | az devops login --organization https://dev.azure.com/contoso/
image

2.#export azure_devops=$(cat my_pat_token.txt)

#echo $azure_devops | az devops login --organization https://dev.azure.com/ChatOpstestOrg/
image

Please let us know if you still faced the issue after trying above methods.

@brunooliveiramelo
Copy link

Hi @Arvindgade I was unable to reproduce successfully.
image

either in the pipeline or in the Linux terminal, same error

@v-anvashist
Copy link

v-anvashist commented Aug 18, 2023

@brunooliveiramelo Did you try az devops logout as suggested in the screenshot shared by you

@Alancere
Copy link

I also encountered the same error, is there any latest solution?

@v-anvashist
Copy link

v-anvashist commented Oct 10, 2023

Hi @Alancere I can see some warnings in your window. Could you please try to run the devops commands after the warnings messages.

Thanks,
Anjali

@Alancere
Copy link

Hi @Alancere I can see some warnings in your window. Could you please try to run the devops commands after the warnings messages.

Thanks, Anjali

image

@rubenCrayon
Copy link

Any update on this error?

@pewebde
Copy link

pewebde commented Nov 13, 2023

I have exactly the same problem - any news?

@jsloan117
Copy link

I've had this same warning message for over a year - any update?

@lizhuhuams
Copy link

I ran into same issue:
lizhuhua@CHIEVMlizhuhu01:~$ az --version
azure-cli 2.53.1 *

core 2.53.1 *
telemetry 1.1.0

Extensions:
azure-devops 0.26.0

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Python location '/opt/az/bin/python3'

az devops login --organization https://dev.azure.com/AzureCSI
Token:
Failed to store PAT using keyring; falling back to file storage.
You can clear the stored credential by running az devops logout.
Refer https://aka.ms/azure-devops-cli-auth to know more on sign in with PAT.

Any workaround?

@v-anvashist
Copy link

Hi @lizhuhuams Are you facing only warnings? Post that are u able to run az devops commands successfully?

@lizhuhuams
Copy link

lizhuhuams commented Dec 20, 2023 via email

@v-anvashist
Copy link

Hi @lizhuhuams You are trying to run commands in which machine is it windows or linux?

Please send some screenshots also.

@vunguyen22271
Copy link

you can work with this task on Azure Pipeline:

@v-agadekar
Copy link

Hi @vunguyen22271, do we need to consider your shared task to work on @lizhuhuams issue? We are not able to repro it fully in Linux environment I can see only warnings but still we are able to run the command as below screenshot for reference
image

@vunguyen22271
Copy link

Hi @vunguyen22271, do we need to consider your shared task to work on @lizhuhuams issue? We are not able to repro it fully in Linux environment I can see only warnings but still we are able to run the command as below screenshot for reference image

Hi, the task I shared working on Azure Pipeline.

About @lizhuhuams issue, I create AZURE_DEVOPS_EXT_PAT environment variable, after that I ran "az pipelines build list" and I can see the Build Information.

I think just ignore the warning and make sure PAT have enough permissions!

@v-agadekar
Copy link

v-agadekar commented Jan 2, 2024

Hi @vunguyen22271, Thanks for the update!

@lizhuhuams We have created the user story for the same and will update in the below work item. Can we close this issue now?

https://dev.azure.com/mseng/AzureDevOps/_workitems/edit/2103441

@rohitnaikn
Copy link

work around
az login --allow-no-subscriptions

login using the GUI
then you must be logged in the console

@pawelkozbial
Copy link

pawelkozbial commented Jul 29, 2024

I have the same issue log in from the container:
58597e0c5719:/# echo $azure_devops | az devops login --organization https://dev.azure.com/INGCDaaS
Failed to store PAT using keyring; falling back to file storage.
You can clear the stored credential by running az devops logout.
Refer https://aka.ms/azure-devops-cli-auth to know more on sign in with PAT

58597e0c5719:/# az --version
azure-cli 2.62.0

core 2.62.0
telemetry 1.1.0

Extensions:
azure-devops 1.0.1

Dependencies:
msal 1.28.1
azure-mgmt-resource 23.1.1

Python location '/usr/local/bin/python'
Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.11.9 (main, Jun 27 2024, 03:24:56) [GCC 13.2.1 20240309]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

cli.azext_devops.dev.common.services: TF400813: The user 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.

@popsovik
Copy link

popsovik commented Aug 21, 2024

the same issue
I can see "project list" but can't create PR

az -v
azure-cli 2.63.0
core 2.63.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.1
Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1
Python location '/opt/az/bin/python3'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.11.8 (main, Jul 31 2024, 03:41:17) [GCC 12.2.0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. DevOps needs-team-attention This issue needs attention from Azure service team or SDK team Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests