简体   繁体   中英

Permission Denied with git remote add in Github Actions

Locally I'm able to do the git deploy and push. In my github actions the following is set after npm build has run:

cd build
git init
git config user.email 'email@email.com'
git config user.name 'github-actions - CI'
git add -A
git commit -m 'build by GA'
git remote add azure https://${{ secrets.GITUSER }}:${{ secrets.GITPW }}@<azure_local_git_url>.git

OUTPUT:

在此处输入图像描述

After this there would be a git push, but clearly the problem is with git remote add.

Cant seem to figure out whats going on.

EDIT: In azure there is an App service, used with local git deployment, and the user and password, which is set in the secrets GITUSER and GITPW, is Application Scope level. This was used by a jenkins server where it worked.

I was looking at the wrong place, since im already checkout out with the sourcecode, I dont have to use git init, which was throwing the Permission Denied.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM