简体   繁体   中英

Using a local Artifactory PowerShell gallery with PowershellGet and Azure AD SAML authentication

We currently have JFrog's Artifcatory as our repository tool of choice, with single-sign on using SAML and Azure Active Directory.

I have now also created a local AF repository for our PowerShell modules. This all works when I use an internal AF user, it works. To install a module I run something like:

$cred = Get-Credential #Your credentials for access to Artifactory
Install-Module MyModule -Repository "MyRepo" -Credential $cred

However, if I pass in credentials for my Azure AD user, I get

WARNING: Unable to resolve package source 'https://......'.

Which is not the "error" I was expecting but yeah, it'd need a token to proceed, not a regular credential.

Is there any way to be able to use PowerShellGet commands such as Install-Module with SAML authentication?

This is probably a permission issue. You can verify that the user you are trying to use have the proper permissions to access this repository in Artifactory. If the user does have permissions, can you reproduce this and attach the logs from the "artifactory.log"? This can help diagnose the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM