Open ashish4github opened 1 year ago
I tried similar setup in a different organization, and as far as I can see it works. Could this be an issue related to permissions?
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @v-anvashist, @V-hmusukula.
Author: | ashish4github |
---|---|
Assignees: | jiasli |
Labels: | `Account`, `Service Attention`, `customer-reported`, `DevOps`, `Auto-Assign` |
Milestone: | Backlog |
Adding Service team for devops issue.
@v-anvashist, @V-hmusukula. Could you please look into this ? Thanks in advance
route to service team
Hello guys,
Any updates on the issue ? Same issue here unfortunately, and something strange is that I can log to DevOps from my pipeline on another task but for a reason I ignore not this one.
@BaillyAlex we had the same issue and we found out that if we set the AZURE_DEVOPS_EXT_PAT: $(System.AccessToken) and skip the az devops login
in the script it works....
Describe the bug We have an existing azure devops pipeline that uses azure cli for login into devops in a script task like below script: echo $(System.AccessToken) | az devops login
This was working fine until version 2.44.1 for azure cli. But now it fails with error below
ERROR: (1783, 'CredWrite', 'The stub received bad data')
below is detailed exception
2023-01-26T19:21:56.1827015Z INFO: keyring.backend: Loading macOS 2023-01-26T19:21:56.1846944Z DEBUG: cli.azext_devops.dev.common.credential_store: Keyring backend : keyring.backends.Windows.WinVaultKeyring (priority: 5) 2023-01-26T19:21:56.2294944Z DEBUG: cli.azext_devops.dev.common.credential_store: Setting credential: azdevops-cli: default 2023-01-26T19:21:56.2471005Z WARNING: cli.azext_devops.dev.team.credentials: Unable to use secure credential store in this environment. 2023-01-26T19:21:56.2472255Z WARNING: cli.azext_devops.dev.team.credentials: Please refer to alternate methods at https://aka.ms/azure-devops-cli-auth 2023-01-26T19:21:56.2473129Z WARNING: cli.azext_devops.dev.team.credentials: using Environment variable 2023-01-26T19:21:56.2473753Z WARNING: cli.azext_devops.dev.team.credentials: or use 'az login' 2023-01-26T19:21:56.2474394Z DEBUG: cli.azext_devops.dev.common.exception_handler: handling generic error 2023-01-26T19:21:56.3155545Z DEBUG: cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: 2023-01-26T19:21:56.3740283Z DEBUG: cli.azure.cli.core.util: Traceback (most recent call last): 2023-01-26T19:21:56.3741404Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error 2023-01-26T19:21:56.3742410Z yield 2023-01-26T19:21:56.3743037Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\win32ctypes\pywin32\win32cred.py", line 37, in CredWrite 2023-01-26T19:21:56.3743879Z _authentication._CredWrite(c_pcreds, 0) 2023-01-26T19:21:56.3744591Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\win32ctypes\core\cffi_authentication.py", line 152, in _CredWrite 2023-01-26T19:21:56.3745255Z return check_zero( 2023-01-26T19:21:56.3745888Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\win32ctypes\core\cffi_util.py", line 81, in call 2023-01-26T19:21:56.3746490Z self._raise_error(function_name) 2023-01-26T19:21:56.3747046Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\win32ctypes\core\cffi_util.py", line 92, in _raise_error 2023-01-26T19:21:56.3747550Z raise exception 2023-01-26T19:21:56.3747924Z OSError: [WinError 1783] The stub received bad data 2023-01-26T19:21:56.3748115Z 2023-01-26T19:21:56.3748635Z During handling of the above exception, another exception occurred: 2023-01-26T19:21:56.3748870Z 2023-01-26T19:21:56.3749157Z Traceback (most recent call last): 2023-01-26T19:21:56.3749734Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\azext_devops\dev\common\credential_store.py", line 35, in set_password 2023-01-26T19:21:56.3750355Z keyring.set_password(key, self._USERNAME, token) 2023-01-26T19:21:56.3750986Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\keyring\core.py", line 63, in set_password 2023-01-26T19:21:56.3751583Z _keyring_backend.set_password(service_name, username, password) 2023-01-26T19:21:56.3752193Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\keyring\backends\Windows.py", line 94, in set_password 2023-01-26T19:21:56.3752799Z self._set_password(service, username, text_type(password)) 2023-01-26T19:21:56.3753409Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\keyring\backends\Windows.py", line 103, in _set_password 2023-01-26T19:21:56.3753969Z win32cred.CredWrite(credential, 0) 2023-01-26T19:21:56.3754533Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\win32ctypes\pywin32\win32cred.py", line 36, in CredWrite 2023-01-26T19:21:56.3755050Z with _pywin32error(): 2023-01-26T19:21:56.3755412Z File "contextlib.py", line 153, in exit 2023-01-26T19:21:56.3755988Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error 2023-01-26T19:21:56.3756634Z raise error(exception.winerror, exception.function, exception.strerror) 2023-01-26T19:21:56.3757178Z win32ctypes.pywin32.pywintypes.error: (1783, 'CredWrite', 'The stub received bad data') 2023-01-26T19:21:56.3757439Z 2023-01-26T19:21:56.3757803Z During handling of the above exception, another exception occurred: 2023-01-26T19:21:56.3758023Z 2023-01-26T19:21:56.3758304Z Traceback (most recent call last): 2023-01-26T19:21:56.3758880Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\azext_devops\dev\team\credentials.py", line 31, in credential_set 2023-01-26T19:21:56.3759493Z set_credential(organization=organization, token=token) 2023-01-26T19:21:56.3760132Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\azext_devops\dev\common_credentials.py", line 33, in set_credential 2023-01-26T19:21:56.3760700Z cred_store.set_password(key, token) 2023-01-26T19:21:56.3761301Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\azext_devops\dev\common\credential_store.py", line 51, in set_password 2023-01-26T19:21:56.3761839Z raise CLIError(ex) 2023-01-26T19:21:56.3762235Z knack.util.CLIError: (1783, 'CredWrite', 'The stub received bad data') 2023-01-26T19:21:56.3762477Z 2023-01-26T19:21:56.3762824Z During handling of the above exception, another exception occurred: 2023-01-26T19:21:56.3763133Z 2023-01-26T19:21:56.3763429Z Traceback (most recent call last): 2023-01-26T19:21:56.3763922Z File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke 2023-01-26T19:21:56.3764676Z File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute 2023-01-26T19:21:56.3765448Z File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially 2023-01-26T19:21:56.3766202Z File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 718, in _run_job 2023-01-26T19:21:56.3767018Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\azext_devops\dev\common\exception_handler.py", line 31, in azure_devops_exception_handler 2023-01-26T19:21:56.3767614Z reraise(*sys.exc_info()) 2023-01-26T19:21:56.3768102Z File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\six.py", line 719, in reraise 2023-01-26T19:21:56.3768802Z File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job 2023-01-26T19:21:56.3769552Z File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call 2023-01-26T19:21:56.3770300Z File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler 2023-01-26T19:21:56.3771083Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-devops\azext_devops\dev\team\credentials.py", line 37, in credential_set 2023-01-26T19:21:56.3771609Z raise CLIError(ex) 2023-01-26T19:21:56.3772022Z knack.util.CLIError: (1783, 'CredWrite', 'The stub received bad data') 2023-01-26T19:21:56.3772251Z 2023-01-26T19:21:56.3772645Z ERROR: cli.azure.cli.core.azclierror: (1783, 'CredWrite', 'The stub received bad data') 2023-01-26T19:21:56.3773214Z ERROR: az_command_data_logger: (1783, 'CredWrite', 'The stub received bad data') 2023-01-26T19:21:56.3773826Z DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x04A7B220>]
Environment summary Azure Devops pipeline executing on MS Hosted Windows 2022 agents
Additional context Pipeline has a resources referring to another git repo in same azure devops project. If i remove this resources reference it works fine.
repositories: