Skip to content

How to install private github repository via npm through "git+https" github actions workflow ci #25936

Answered by weide-zhou
aarefiev asked this question in Actions
Discussion options

You must be logged in to vote

Hi @aarefiev,

Glad to see you in Github Community Forum!

actions/checkout@v2 will persist GITHUB_TOKEN and add extra http header to latter git operations.

Please add persist-credential: false to actions/checkout@v2, and add below command before npm command:
run: git config --global url."https://${{ secrets.PAT }}@github.com/".insteadOf ssh://git@github.com/

Please refer to the link for more details.

Thanks.

Replies: 1 comment

Comment options

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