Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Setting up codespaces with private Devops Artifacts repo

Đang mở
#80 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
azure, docker, shell
Lĩnh vực
authentication, cloud, devops

Hướng nghiên cứu

Bắt đầu với cấu hình devcontainer feature và đầu ra của Azure Artifacts Credential Provider được hiển thị trong issue. Điều tra phần phụ thuộc libsecret còn thiếu và luồng xác thực; được xem là hoàn tất khi dotnet restore có thể truy xuất các gói từ feed Azure DevOps riêng tư mà không có lỗi về tính bền vững hoặc thông tin xác thực.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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:latest to the features list of the devcontainer.
Image

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.

Ngôn ngữ chính
Shell
Star
26
Fork
20
Merge trung bình
9 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/codespace-features

Tất cả issue của microsoft/codespace-features

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.