Skip to content
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

Use valid git credentials when multiple are provided #1669

Merged
merged 3 commits into from Oct 29, 2020

Conversation

@arcln
Copy link
Contributor

@arcln arcln commented Oct 28, 2020

See #1668 for details about the issue. Here I will discuss about the fix implementation.

If the given URL works out of the box or if a single token is available in the environment, the behaviour remains unchanged.
However if there is multiple tokens available, it will perform a git.verifyAuth call for each of them, and return the first of them that is working.
If none of them are working, it will return the URL as is.

This behaviour is tested in integration.test.js. It isn't tested in get-git-auth-url.test.js because I need gitbox functionalities to test it.

test/integration.test.js Outdated Show resolved Hide resolved
Loading
Copy link
Member

@gr2m gr2m left a comment

Great work! Just a small typo. I would have fixed it myself but don't have write access to your fork

Loading

arcln and others added 3 commits Oct 29, 2020
@arcln arcln force-pushed the fix-multiple-git-tokens branch from 2dffc91 to 0ec1718 Oct 29, 2020
@arcln
Copy link
Contributor Author

@arcln arcln commented Oct 29, 2020

Fixed the typo and conflicts, ready to merge!

Loading

gr2m
gr2m approved these changes Oct 29, 2020
Copy link
Member

@gr2m gr2m left a comment

Thanks 👍🏼

Loading

@gr2m gr2m merged commit 2bf3771 into semantic-release:master Oct 29, 2020
4 checks passed
Loading
@semantic-release-bot
Copy link
Collaborator

@semantic-release-bot semantic-release-bot commented Oct 29, 2020

🎉 This PR is included in version 17.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants