-
Notifications
You must be signed in to change notification settings - Fork 525
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
Adding feature to verify the URL and credential correctness before storing them in paket.config #2781
Adding feature to verify the URL and credential correctness before storing them in paket.config #2781
Conversation
…oring them in paket.config
src/Paket.Core/PublicAPI.fs
Outdated
@@ -165,10 +165,10 @@ type Dependencies(dependenciesFileName: string) = | |||
projectName, installAfter, runResolver)) | |||
|
|||
/// Adds credentials for a Nuget feed | |||
member this.AddCredentials(source: string, username: string, password : string, authType : string) : unit = | |||
member this.AddCredentials(source: string, username: string, password : string, authType : string, verify : bool) : unit = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is in the PublicAPI and would be breaking.
We need a second function and keep the old one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
let authResult = | ||
if verify then | ||
Console.WriteLine "Verifying the source URL and credentials..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use tracef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool stuff. only minor comments
Thanks. I will update the code with the requested changes. |
thx! |
You are welcome and thanks for the quick review, subsequent merge |
While adding a source and its credentials to paket.config, it often happens that there are typos or the credentials do not authenticate, in that case adding these credentials and sources to paket.config becomes pointless. So we propose to have --verify option to augment the config command. It verifies the URL for the source and the credentials are correct.