fsprojects / fsprojects/Paket

Environment variable password does not authenticate private feed during convert-from-nuget

Open
#1,822 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug credentials nuget-convert
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

I am converting a project from NuGet to Paket using the convert-from-nuget command. As per this page I should be able to authenticate a private feed through the %PRIVATE_FEED_USER% and %PRIVATE_FEED_PASS% variables, but I cannot. Supplying the credentials as plaintext in the file works and I have verified that the variables do exist in the executing environment as echo %PRIVATE_FEED_USER% and echo %PRIVATE_FEED_PASS% return the correct values.

The --creds-migrations options are not satisfactory as I would not like to have plaintext passwords in source control, but for a multi-user environment, it does not make sense to encrypt one user's credentials and put it under source control. Users should be able to supply their own credentials for the private (TeamCity) NuGet feed.

Repro steps
  1. Have a non-Paket project that consumes a private NuGet feed (this one is TeamCity) for a dependency.
  2. Create a .paket directory with paket.exe, paket.bootstrap.exe, and paket.targets
  3. Create a paket.dependencies file to specify the source with source </path/to/feed/uri> username: "%PRIVATE_FEED_USER%" password: "%PRIVATE_FEED_PASS%"
  4. Set the PRIVATE_FEED_USER and PRIVATE_FEED_PASS to valid credentials
  5. Ensure that these are in effect in the current executing environment with echo
  6. Run .paket/paket.exe convert-from-nuget --force or .paket/paket.exe convert-from-nuget in the main project directory.
Expected behavior

Environmental variables should authenticate private feeds with convert-from-nuget.

Actual behavior

Paket fails to retrieve package listing when using convert-from-nuget with environmental variables for a private NuGet feed, but succeeds when using plaintext credentials.

Known workarounds

Put plaintext credentials in the paket.dependencies file.

Related information
  • Operating system: Windows 7 Professional SP1
  • Branch: Paket master tagged 3.8.0
  • .NET Runtime, CoreCLR or Mono Version: .NET Framework 4.5.1
  • Performance information, links to performance testing scripts

I can spend some more time on this later, but I want to make sure this is not "expected behavior" and I'm just missing something.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the convert-from-nuget command and the paket.dependencies source declaration described in the reproduction steps. Reproduce the failure with PRIVATE_FEED_USER and PRIVATE_FEED_PASS set, then compare it with plaintext credentials; done means the conversion retrieves the private-feed package listing using the environment variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
cli, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.