Permission Denied with git remote add in Github Actions

Viewed 47

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:

enter image description here

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.

1 Answers

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

Related