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

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

Comments

Projects
None yet
2 participants
@curtnichols
Contributor

curtnichols commented Feb 3, 2016

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#
    Paket.Core.dll!Paket.RemoteDownload.auth@81-1.Invoke(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

This comment has been minimized.

Show comment
Hide comment
@forki

forki Feb 4, 2016

Member

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?

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

This comment has been minimized.

Show comment
Hide comment
@curtnichols

curtnichols Feb 4, 2016

Contributor

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

Contributor

curtnichols commented Feb 4, 2016

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

@curtnichols curtnichols closed this Feb 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment