Skip to content

Commit 23a5afd

Browse files
authored
add npx semantic-release GitHub auth workaround
This is a workaround when using `npx semantic-release` enforcing GitHub auth.
1 parent b405e42 commit 23a5afd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

user/common-build-problems.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,3 +646,27 @@ env:
646646
- NODE_OPTIONS="--dns-result-order=ipv4first"
647647
```
648648
{: data-file=".travis.yml"}
649+
650+
## **NPM Semantic Release Issue**: Fixes semantic-release `EGITNOPERMISSION` from GitHub
651+
652+
If you're using NPM and you're deploying with semantic-release and you get the `EGITNOPERMISSION` error at the end of your build, you may want to try and add the following to your build definition:
653+
654+
The first example is if you're using `npx semantic-release` within the deploy phase in the `.travis.yml` definition:
655+
656+
```yml
657+
before_deploy:
658+
- git config --global credential.helper store
659+
- git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
660+
```
661+
662+
The second example would be if you're using `npx semantic-release` directly in your script phase of your `.travis.yml` build definition:
663+
664+
```yml
665+
before_script:
666+
- git config --global credential.helper store
667+
- git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
668+
```
669+
For more information please look at this [GitHub Issue](https://github.com/semantic-release/semantic-release/issues/3590).
670+
671+
{: data-file=".travis.yml"}
672+

0 commit comments

Comments
 (0)