question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails with missing GitHub token when --dry-run and --no-ci

See original GitHub issue

When running with --dry-run --no-ci I get this fatal error

[semantic-release] » i  Start step "verifyConditions" of plugin "@semantic-release/github"
[semantic-release] [@semantic-release/github] » i  Verify GitHub authentication
[semantic-release] » ×  Failed step "verifyConditions" of plugin "@semantic-release/github"
[semantic-release] » ‼  Skip step "fail" of plugin "@semantic-release/github" in dry-run mode
[semantic-release] » ×  ENOGHTOKEN No GitHub token specified.
A GitHub personal token (https://github.com/semantic-release/github/blob/master/README.md#github-authentication) must be created and set in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment.

Please make sure to create a GitHub personal token (https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) and to set it in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment. The token must allow to push to the repository <REDACTED>.

AggregateError: 
    SemanticReleaseError: No GitHub token specified.

I was expecting thous options to make the plugin play nice 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
pvdlgcommented, Apr 7, 2020

The goal of --dry-run is to make sure the real run will work on your CI so we make the verification. The @semantic-release/github plugin requires a GH_TOKEN environment variable to be set and you don’t have one so it report that error.

3reactions
ivanjicommented, Jun 7, 2022

Not sure why this is closed - The issue still persists, I’m not even using github anywhere - my repo is on BitBucket and I have a private registry, nowhere in my config I’m using this plugin but I keep getting

[semantic-release] [@semantic-release/github] » i  Verify GitHub authentication
[11:55:21 am] [semantic-release] » ×  Failed step "verifyConditions" of plugin "@semantic-release/github"
[11:55:21 am] [semantic-release] » ‼  Skip step "fail" of plugin "@semantic-release/github" in dry-run mode
[11:55:21 am] [semantic-release] » ×  ENOGHTOKEN No GitHub token specified.
A GitHub personal token (https://github.com/semantic-release/github/blob/master/README.md#github-authentication) must be created and set in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment.

Please make sure to create a GitHub personal token (https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) and to set it in the GH_TOKEN or GITHUB_TOKEN environment variable on your CI environment. The token must allow to push to the repository [bit_bucket_repo_url_replaced_here_for_privacy].

AggregateError: 
    SemanticReleaseError: No GitHub token specified.
Read more comments on GitHub >

github_iconTop Results From Across the Web

The command "git push --dry-run --no-verify [...]" failed with the ...
The GitHub token is definitely present (defined using the GitHub Actions GITHUB_TOKEN secret), why does the error say it's not authenticated?
Read more >
semantic-release does not respect --no-ci flag under some ...
In your case it seems you have some environment variables that contradict what you expect. It seems you are using Circle CI and...
Read more >
Dry run still tries to connect to git · Issue #1168 - GitHub
This issue must be reopened. A local dry-run cannot use ssh keys (because SR uses GitHub API and they requires tokens). Tokens cannot...
Read more >
repositoryUrl is forcefully transformed · Issue #888 - GitHub
I'm using git/ssl to interact with the repo on my gitlabserver. running the failing git push --dry-run from commandline works just fine (see...
Read more >
ENOGHTOKEN No GitHub token specified. with ...
ENOGHTOKEN No GitHub token specified. with GITHUB_TOKEN definitely specified #244. Closed. bionicles opened this issue on Jan 21, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found