Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downloadDependenciesFile fails when source repo doesn't have a dependencies file #1456

Closed
curtnichols opened this issue Feb 3, 2016 · 2 comments

Comments

@curtnichols
Copy link
Contributor

Scenario: I'm downloading an individual file from a private repo using a known-good access token. I'm running paket install. This fails with "Credentials from authentication store for mytok are invalid."

Observation in the debugger:

  • Paket is requesting a paket.dependencies file from the source repo (the repo from which I'm fetching a file). This file does not exist.
  • I did not request paket.dependencies. Paket seems to think it should be there in the source repo.
  • Upon trying to retrieve the non-existent file checkCredentials fails ("The remote server returned an error: (404) Not Found."; this exception is swallowed), causing the error message above in GetAuthenticationForUrl. So it fails while trying to check dependencies.

Please verify that Paket should not require a paket.dependencies file in the source repo--the repo from which I'm fetching a file. This is undesirable behavior.

Let me know if you have questions. Here's the call stack when the exception is thrown; line numbers may be slightly off as I've added a little code for easier debugging:

    Paket.Core.dll!Paket.ConfigFile.checkCredentials(string url = "https://raw.githubusercontent.com/SoundMetrics/arepo/longpath/command-module/paket.dependencies", Microsoft.FSharp.Core.FSharpOption<Paket.Utils.Auth> cred = Some({Paket.Utils.Auth.Token})) Line 126   F#
    Paket.Core.dll!Paket.ConfigFile.GetAuthenticationForUrl(string source = "mytok", string url = "https://raw.githubusercontent.com/SoundMetrics/arepo/longpath/paket.dependencies") Line 157  F#
    [email protected](string key = "mytok") Line 81  F#
    Paket.Core.dll!Paket.RemoteDownload.downloadDependenciesFile@65<Paket.DependenciesFile>.Invoke(Microsoft.FSharp.Core.Unit unitVar = null) Line 79   F#
@forki
Copy link
Member

forki commented Feb 4, 2016

Unfortunately I can't reproduce, so this might be a little ping pong. I made a fix around that code. Can you please try with latest version?

@curtnichols
Copy link
Contributor Author

This appears to work with Paket version 2.49.3.0. Thanks!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants