Downloading github files through proxy
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
Paket does not work with github files from behind proxy.
When building paket.sln:
Severity Code Description Project File Line Suppression State
Error Could not download from https://raw.githubusercontent.com/fsharp/FAKE/7f9fe8f546f6adec66febeec31e50821b60814d6/modules/Octokit/Octokit.fsx
Message: One or more errors occurred.
Details: The underlying connection was closed: An unexpected error occurred on a send. C:\Git\Third Party\Paket\integrationtests\Paket.IntegrationTests\paket.references 0
Repro steps
#r "System.dll"
open System.Net
let https = @"https://raw.githubusercontent.com/fsharp/FAKE/f4024fd5b790485828c1cfc002190716eee97597/modules/Octokit/Octokit.fsx";
let http = @"http://stackoverflow.com/"
let download (url:string) =
printfn "%s" url;
try
use client = new WebClient()
// client.Proxy.Credentials <- System.Net.CredentialCache.DefaultNetworkCredentials
client.DownloadString url |> ignore
printfn "Success!"
with
| ex -> printfn "Exception! %s " (ex.Message)
download http
download https
Uncommenting the proxy line gives success for http but exception for https.
Exception! The remote server returned an error: (403) Forbidden.
I don't know much about proxies, been testing a bunch of stackoverflow answers but nothing has worked. If anyone has suggestions please paste a modified script and I'll run it and output the results.
Known workarounds
a) Download the files manually and turn off auto-restore.
b) This is a nasty hack, but it works for downloading the file. It is Windows only and brings in WPF or WinForms references which is not ideal.
Related information
- Win 7
- Latest paket and every version I have tried.
- .NET
- Don't know much about the proxy in use.
- Browsing to the file via browser works.
- Git.exe works from behind the proxy.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the F# reproduction script and the integrationtests/Paket.IntegrationTests/paket.references example. Investigate the Paket download path for raw.githubusercontent.com and compare proxy behavior for HTTP and HTTPS. Done means a Paket restore or build can download the referenced GitHub file through the reported proxy setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp, git, github
- Domain
- networking, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100