Skip to content

Npm install fails with package.json containing a private repository url with git+https #25983

Answered by Yanjingzhu
akoskm asked this question in Actions
Discussion options

You must be logged in to vote

Let me help you troubleshoot this issue.

  1. Please run
git config --local -l

and check the authorization token in http.https://github.com/.extraheader=AUTHORIZATION: basic .

  1. Could you please run npm install command directly in a run script? You could store your PAT in secrets.
 - name : install private github repo
   run: |
       npm install git+https://$ANOTHER_TOKEN:x-oauth-basic@github.com/my-org/my-private-repo.git
   env: 
       ANOTHER_TOKEN: ${{ secrets.YourPAT }}
  1. Please try to run your job on ubuntu-latest runner , will npm install step succeed?

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants