semantic-release: SemanticReleaseError: The push permission to the Git repository is required

GH_TOKEN was set via semantic-release-cli setup. I restarted the build, same result. Then I manually created a new token and updated it on travis, still same result.

Current behavior

https://travis-ci.org/gr2m/octokit-rest-routes/jobs/352181416#L2017

Expected behavior

It should publish a new version.

Environment

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 24 (20 by maintainers)

Most upvoted comments

I created an issue: The push permission to the Git repository is required v2 #708

Thanks for the extended bug report! Could you please create a follow up issue? It will be easier to track for us. My issue was fixed so it looks like yours is slightly different.

v15.0.3 had a change related to the URLs, maybe that’s a good place to start digging: b0b4fc8

Oh, ouch. That’s unfortunate.

I use the shorthand in almost all of my packages. Looks like I’ve got some updates ahead of me.

Any chance supporting the shorthand is on the roadmap?

If you use the environment variable you have to set it to DEBUG=semantic-release:*. It seems to required by debug.

I noticed the problem with Unable to find remote helper for 'git+https' and I’m working on a fix. The problem is that when we retrieve the package.json here it goes through normalize-package-data which transform the URL to git+https format for some reason.

We check if the bare URL from package.json allow us to push here and it it doesn’t we transform the URL to add the auth part.

Because of this issue verifyAuth(options.repositoryUrl, options.branch) always return false so we always go into getGitAuthUrl(options.repositoryUrl) which transform the git+https URL into https.

So this problem is not the cause of The push permission to the Git repository is required. The only explanation I see for The push permission to the Git repository is required is a temporary issue on GitHub or Travis.