diff --git a/src/Paket.Core/Common/Utils.fs b/src/Paket.Core/Common/Utils.fs
index fce667aa8c..ce422ea554 100644
--- a/src/Paket.Core/Common/Utils.fs
+++ b/src/Paket.Core/Common/Utils.fs
@@ -567,8 +567,15 @@ let createHttpClient (url,auth:Auth option) =
client
#if USE_WEB_CLIENT_FOR_UPLOAD
+type CustomTimeoutWebClient(timeout) =
+ inherit WebClient()
+ override x.GetWebRequest (uri:Uri) =
+ let w = base.GetWebRequest(uri)
+ w.Timeout <- timeout
+ w
+
let createWebClient (url,auth:Auth option) =
- let client = new WebClient()
+ let client = new CustomTimeoutWebClient(20 * 60 * 1000)
client.Headers.Add("User-Agent", "Paket")
client.Proxy <- getDefaultProxyFor url
diff --git a/src/Paket.Core/PublicAPI.fs b/src/Paket.Core/PublicAPI.fs
index a45417d080..758f31bb46 100644
--- a/src/Paket.Core/PublicAPI.fs
+++ b/src/Paket.Core/PublicAPI.fs
@@ -669,8 +669,11 @@ type Dependencies(dependenciesFileName: string) =
Some(key)
| None -> None
- let configKey = url |> Option.bind ConfigFile.GetAuthentication |> Option.bind (fun a -> match a with Token t -> Some t | _ -> None )
- let firstPresentKey =
+ let configKey =
+ let url = defaultArg url "https://nuget.org"
+ ConfigFile.GetAuthentication url |> Option.bind (fun a -> match a with Token t -> Some t | _ -> None )
+
+ let firstPresentKey =
[apiKey; envKey; configKey]
|> List.choose id
|> List.where (String.IsNullOrEmpty >> not)
diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj
index fee9b76ca0..9101cef729 100644
--- a/src/Paket/Paket.fsproj
+++ b/src/Paket/Paket.fsproj
@@ -31,8 +31,8 @@
Project
paket.exe
Project
- restore -v --group Release
- D:\temp\isaac
+ -v push file nuget/legacy/FAKE.5.0.0-alpha012.nupkg
+ C:\proj\FAKE\
true