Setting up codespaces with private Devops Artifacts repo
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- azure, docker, shell
- 領域
- authentication, cloud, devops
調査の方向性
devcontainer feature の構成と、issue に示されている Azure Artifacts Credential Provider の出力から始めます。不足している libsecret 依存関係と認証フローを調査します。完了の条件は、dotnet restore で永続化エラーや認証情報エラーを発生させずに、非公開の Azure DevOps フィードからパッケージを取得できることです。
索引モデルが issue の本文から書いたものです。
説明
I'm unsuccessfully trying to setup my codespaces to use a private artifacts repo hosted on Azure Devops.
- The base image for the devcontainer used is mcr.microsoft.com/devcontainers/dotnet:1-8.0
- I've added the
ghcr.io/microsoft/codespace-features/artifacts-helper:latestto the features list of the devcontainer.
Assuming my understanding is correct this should install the Azure Devops Codespaces Authentication extension and the Azure Artifacts Credential Provider nuget credentials plugin which should enable us to fetch the nuget packages.
This is installed as expected and the ~/azure-auth-helper get-access-token will returns a token as expected, the dotnet restore still fails with
warning : [CredentialProvider]Warning: Cannot persist Microsoft authentication token cache securely!
Verbose output will show
[CredentialProvider]Handling 'Request' 'GetAuthenticationCredentials'. Time elapsed in ms: 0 - Payload: {"Uri":"https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json","IsRetry":false,"IsNonInteractive":true,"CanShowDialog":false}
[CredentialProvider]Creating a progress reporter with interval: 00:00:02
[CredentialProvider]Handling auth request, Uri: https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json, IsRetry: False, IsNonInteractive: True, CanShowDialog: False
[CredentialProvider]URI: https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json
[CredentialProvider]VstsBuildTaskServiceEndpointCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet with external endpoint credentials. Appropriate environment variable needs to be set.
[CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTaskServiceEndpoint.VstsBuildTaskServiceEndpointCredentialProvider, cannot provide credentials for https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json
[CredentialProvider]VstsBuildTaskCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet. Appropriate environment variables must be set.
[CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTask.VstsBuildTaskCredentialProvider, cannot provide credentials for https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json
[CredentialProvider]VstsCredentialProvider - Matched well-known Azure DevOps Service hostname: pkgs.dev.azure.com
[CredentialProvider]Using NuGetCredentialProvider.CredentialProviders.Vsts.VstsCredentialProvider to try to get credentials for https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json.
[CredentialProvider]IsRetry: False
[CredentialProvider]Could not find cached SessionToken for https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json
[CredentialProvider]Found AAD Authority from 401 headers: https://login.windows.net/xxx
[CredentialProvider]VstsCredentialProvider - Using Entra authority: https://login.windows.net/xxx
[CredentialProvider]VstsCredentialProvider - Not running bearer token provider 'MSAL Service Principal'
[CredentialProvider]VstsCredentialProvider - Not running bearer token provider 'MSAL Managed Identity'
[CredentialProvider]VstsCredentialProvider - Attempting to acquire bearer token using provider 'MSAL Silent'
[CredentialProvider]MSAL Log (Always): False MSAL 4.64.0.0 MSAL.NetCore .NET 8.0.19 Linux [2025-09-11 16:46:08Z] [Internal cache] Clearing user token cache accessor.
[CredentialProvider]MSAL Log (Always): False MSAL 4.64.0.0 MSAL.NetCore .NET 8.0.19 Linux [2025-09-11 16:46:08Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 0
[CredentialProvider]MSAL Log (Info): False MSAL 4.64.0.0 MSAL.NetCore .NET 8.0.19 Linux [2025-09-11 16:46:08Z - 78391143-6cee-437c-b3dd-aefa95bef200] IsLegacyAdalCacheEnabled: yes
[CredentialProvider]MSAL Log (Info): False MSAL 4.64.0.0 MSAL.NetCore .NET 8.0.19 Linux [2025-09-11 16:46:08Z - 78391143-6cee-437c-b3dd-aefa95bef200] [Region discovery] Not using a regional authority.
[CredentialProvider]MSAL Log (Info): False MSAL 4.64.0.0 MSAL.NetCore .NET 8.0.19 Linux [2025-09-11 16:46:08Z - 78391143-6cee-437c-b3dd-aefa95bef200] IsLegacyAdalCacheEnabled: yes
[CredentialProvider]MSAL Log (Info): False MSAL 4.64.0.0 MSAL.NetCore .NET 8.0.19 Linux [2025-09-11 16:46:08Z - 78391143-6cee-437c-b3dd-aefa95bef200] IsLegacyAdalCacheEnabled: yes
[CredentialProvider]MSAL Log (Info): False MSAL 4.64.0.0 MSAL.NetCore .NET 8.0.19 Linux [2025-09-11 16:46:08Z] Found 0 cache accounts and 0 broker accounts
[CredentialProvider]MSAL Log (Info): False MSAL 4.64.0.0 MSAL.NetCore .NET 8.0.19 Linux [2025-09-11 16:46:08Z] Returning 0 accounts
[CredentialProvider]VstsCredentialProvider - Bearer token provider 'MSAL Silent' didn't acquire a token
[CredentialProvider]VstsCredentialProvider - Not running bearer token provider 'MSAL Interactive'
[CredentialProvider]VstsCredentialProvider - Not running bearer token provider 'MSAL Device Code'
[CredentialProvider]VstsCredentialProvider - Could not obtain credentials for https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json
[CredentialProvider]Unable to acquire credentials.
[CredentialProvider]Sending response: 'Request' 'GetAuthenticationCredentials'. Time elapsed in ms: 2
[CredentialProvider]Time elapsed in milliseconds after sending response 'Request' 'GetAuthenticationCredentials': 2
In addition to this it will also complain about this
[CredentialProvider]Microsoft.Identity.Client.Extensions.Msal.MsalCachePersistenceException: Persistence check failed. Inspect inner exception for details
---> System.DllNotFoundException: Unable to load shared library 'libsecret-1.so.0' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.19/libsecret-1.so.0: cannot open shared object file: No such file or directory
/home/vscode/.nuget/plugins/netcore/CredentialProvider.Microsoft/libsecret-1.so.0: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.19/liblibsecret-1.so.0: cannot open shared object file: No such file or directory
/home/vscode/.nuget/plugins/netcore/CredentialProvider.Microsoft/liblibsecret-1.so.0: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.19/libsecret-1.so.0.so: cannot open shared object file: No such file or directory
/home/vscode/.nuget/plugins/netcore/CredentialProvider.Microsoft/libsecret-1.so.0.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.19/liblibsecret-1.so.0.so: cannot open shared object file: No such file or directory
/home/vscode/.nuget/plugins/netcore/CredentialProvider.Microsoft/liblibsecret-1.so.0.so: cannot open shared object file: No such file or directory
at Microsoft.Identity.Client.Extensions.Msal.Libsecret.secret_schema_new(String name, Int32 flags, String attribute1, Int32 attribute1Type, String attribute2, Int32 attribute2Type, IntPtr end)
at Microsoft.Identity.Client.Extensions.Msal.LinuxKeyringAccessor.GetLibsecretSchema()
at Microsoft.Identity.Client.Extensions.Msal.LinuxKeyringAccessor.Write(Byte[] data)
at Microsoft.Identity.Client.Extensions.Msal.Storage.VerifyPersistence()
--- End of inner exception stack trace ---
at Microsoft.Identity.Client.Extensions.Msal.Storage.VerifyPersistence()
at Microsoft.Identity.Client.Extensions.Msal.MsalCacheHelper.VerifyPersistence()
at Microsoft.Artifacts.Authentication.MsalCache.GetMsalCacheHelperAsync(String cacheLocation, ILogger logger) in D:\a_work\1\s\src\Authentication\MsalCache.cs:line 52
I can't figure what is missing to get this working, any help would be appreciated.
- 主要言語
- Shell
- スター
- 26
- フォーク
- 20
- 平均マージ
- 9分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/codespace-features のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
microsoft/codespace-features#118 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
microsoft/codespace-features#97 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
microsoft/codespace-features#32 · コメント 2 件 ·
microsoft/codespace-features の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
astral-sh/python-build-standalone#1293 ·
-
package-update
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
oSoWoSo/vOid_Community_repOsitory#185 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
carbon-language/carbon-lang#7821 ·