-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix #4936: warn user about auth overwriting #4971
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
fix #4936: warn user about auth overwriting #4971
Conversation
| $repositoryName | ||
| ) | ||
| ); | ||
| } |
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.
Sorry but this really has to be checked in loadConfiguration below before calling setAuthentication, because otherwise when we do interactive prompts for passwords we might end up writing the same auth domain/repositoryName a few times and I think that'd be quite confusing for users to see this warning at that point.
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.
@Seldaek, thanks for review! I will update my pull request.
what do you think if I'll replace setAuthentication call inside loadConfiguration to new protected function with this check/warning inside?
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.
please, review updated code
2da9dd2 to
957e1cc
Compare
|
Looks good like this I think, thanks :) |
fix #4936: warn user about auth overwriting
|
Guys, I think its bugged, from nothing my composer started yelling this error all the time. I only have one auth.json config file and no domains repetitions, it also yells errors even when in an empty directory I do a composer require some package. How can I better try to debug this to help? |
|
+1, I am experiencing the same. To reproduce, just go to a random directory and type
In my case I see two warnings because I have both authentication for GitHub and GitLab: Please fix as the yellow warning is quite annoying :) |
|
Hmm.. could be due to loading the global auth file.. I'll investigate. |
|
In the meantime if either of you could paste the content of their auth.json (both global and local if present) without passwords obviously but just wondering how the config looks like.. And also please check if you have in composer.json or global config.json some auth config as well. |
|
Can't reproduce this here guys so I need one of you to give more details. |
|
Thx for the quick response! My auth.json is as follows: and my config.json is this: This is the contents of my ~/.composer: |
|
@eXistenZNL no warning for me using that.. Can you paste the output of |
|
@eXistenZNL @renatomefidf please give me full -vvv output :) |
|
verbose output: home config.json home auth.json ./composer.json |
It's caused by the reload when |
|
Fixed in 6d1e8eb |
|
Cool, that was pretty fast! :) Thanks |
|
Confirmed to be working both on my native host and my docker image. I found this whilst trying to build the fastest smallest composer docker image possible, so at first I thought I missed a dependency or an extension or so but then I also noticed the same problem when running on my host. Just checked and the problem is gone in both my docker image (Based on Alpine Linux), and my host (Ubuntu 15.10) Thanks! |
No description provided.