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

Authentication failure with valid token #771

Closed
Arcanemagus opened this issue May 3, 2018 · 11 comments
Closed

Authentication failure with valid token #771

Arcanemagus opened this issue May 3, 2018 · 11 comments

Comments

@Arcanemagus
Copy link

Current behavior

semantic-release is throwing an EGITNOPERMISSION error, even though the same token works perfectly when manually running the command that supposedly is failing.

Expected behavior

When a GITHUB_TOKEN is provided with the proper credentials, it should work.

Environment

Additional Information

Potentially related to the changes to fix #709?

@pvdlg
Copy link
Member

pvdlg commented May 4, 2018

I looked in detail but I couldn't figure out what happened...

I don't think it could be related to #709 as I don't see the message The local branch %s is behind the remote one, therefore a new version won't be published in the logs.

I opened #772 that logs the output of the git push --dry-run. That would help debugging hopefully.

What happen if you set the DEBUG environment variable to semantic-release:* in Travis and restart the hob https://travis-ci.org/AtomLinter/linter-htmllint/jobs/373647402 ?

@Arcanemagus
Copy link
Author

Ah ha! It looks like the repository definition wasn't quite correct, leading it to not recognize the repository!

@pvdlg
Copy link
Member

pvdlg commented May 4, 2018

That's weird, the URL seems correct. But it seems the git CLI doesn't like it...

@pvdlg
Copy link
Member

pvdlg commented May 4, 2018

I think we had cases where adding .git at the end of the URL solved this type of issue.
It might be related to the git version. On my local machine with version 2.17.0, it works with and without the trailing .git. It seems that on Travis it might make a difference.

@Arcanemagus
Copy link
Author

Yea, I've had to add .git on the end of all the repos so far. This is one of the 2 that I haven't done personally and I forgot to check it myself.

@pvdlg
Copy link
Member

pvdlg commented May 4, 2018

I'm really curious to know why the trailing .git makes a difference in some cases.
I tested there https://travis-ci.org/pvdlg/test-sr/jobs/374590162#L443 and it seems both works.

Maybe an obscure thing with slightly different version of git running on different Travis images....

@Arcanemagus
Copy link
Author

Your test job is running on the node_js image just like these builds, so it's not the image itself at least.

@pvdlg
Copy link
Member

pvdlg commented May 4, 2018

Indeed. Can't figure out what's causing this "not found" error when omitting the .git...

@Arcanemagus
Copy link
Author

Confirming that adding it at least fixed the build.

@pvdlg
Copy link
Member

pvdlg commented May 4, 2018

Great news!
I'd like to figure out when exactly the .git is required as some people have encounter this issue as well... If anyone reading this thread has any idea...

@pvdlg
Copy link
Member

pvdlg commented May 4, 2018

Closing in favor of #774

@pvdlg pvdlg closed this as completed May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants