-
Notifications
You must be signed in to change notification settings - Fork 136
PowerShellGet cannot publish modules with dependencies to galleries which require credentials #142
Comments
I think it is not possible to pass credentials to nuget.exe in non-interactive session. I`m dealing with it by creating/updating a user profile nuget config file every time. |
@Jaykul This issue should be resolved with PR #93 . Could you please try with the latest version (1.1.3.1) of PowerShellGet and let us know if this issue is resolved or not? |
What nuget.exe can do is mostly irrelevant -- the cmdlets support When we invoke However, after that, it calls Although |
i submitted a PR that was accepted that added this. |
You are absolutely right, @bmanikm, @dotps1 -- I can't believe I didn't see that release, but in my own defense, it came out right after I started investigating all of this! 😉 I took vacation and got sidetracked by two other more "urgent" issues in the backlog, so the whole thing took longer than it should have. Thanks guys -- I should have thought to check for a new release when I got back. I'll close this. |
If a gallery requires
Credentials
for search, PowerShellGet cannot publish modules to that gallery if they have RequiredModules which are not external.Expected Behavior
Publish-Module should publish modules, as long as their dependencies are either available on the repository being published to, or marked external.
Current Behavior
PowerShellGet cannot resolve the module dependency
Possible Solution
Pass credentials through to the dependency check
Steps to Reproduce (for bugs)
Context
After the fixes described in the workaround for #133 we have been successfully using Visual Studio Online as a PowerShell repository. Now we need to publish modules which have dependencies, and we've found that the dependency check that PowerShellGet does does not pass the credentials through (even though it does pass the credentials to the Find-Module which tests to see if the module's already published, it does not pass them to
Get-ModuleDependencies
For example:
In the first one, I've marked
Microsoft.PowerShell.Utility
as anExternalModuleDependencies
-- even though I think PowerShellGet should be smart enough to figure out the built-in modules are ... built-in.When I try to publish, this happens:
PowerShellGet version 1.1.2
The text was updated successfully, but these errors were encountered: