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
getBranches does not use git auth url #1170
Comments
I am encountering the same issue but with a GitHub repo instead. Do you have a gist of the purposed change? |
If you could start a PR that’d be great, we can continue the discussion there :) |
Currently working on resolving all the places where origin is used instead of the correct auth url. |
did anybody figure out a workaround for this problem? |
Alexander, please let us know if @jmodjeski75’s fork fixed the issue for you |
@gr2m I tested the fork with devDependencies |
Fixed by #1186 in beta |
Current behavior
I'm running semantic-release in a
node:11
docker container, withGL_URL
andGL_TOKEN
values provided.During the setup phase after
verify(context)
,getBranches
is then called which eventually results in the invocation of the git commandgit ls-remote --heads origin
. This is made without any auth and results in an authentication error from the remote.I've followed the code path through, and the command is invoked in
lib/branches/expand.js
Should
getGitAuthUrl
be run first, and then theoptions.repositoryUrl
be passed through togetBranches
and subsequently also the call tofetch
inlib/branches/index
?I've added that change in locally and
getBranches
works when using thegitAuthUrl
instead oforigin
.I'd be happy to submit a PR if this approach is valid.
Expected behavior
There should not be an authentication error when a token is supplied.
Environment
Note: this is running in a
node:11
docker container.The text was updated successfully, but these errors were encountered: