codemagic-ci-cd / codemagic-docs

Here you’ll find some essential information for setting up CI/CD for your mobile apps with Codemagic.
https://docs.codemagic.io
MIT License
83 stars 121 forks source link

Pushing change to the repo from build fails #1034

Closed ivinskyi closed 2 years ago

ivinskyi commented 2 years ago

Discussed in https://github.com/orgs/codemagic-ci-cd/discussions/1033

Originally posted by **ivinskyi** October 8, 2022 I'm trying to push a change to the repository from build, follow the advice here https://docs.codemagic.io/troubleshooting/accessing-builder-machine-via-ssh/#making-configuration-changes and it fails. Note: I put this in a build itself, not executing the commands via SSH or VNC connection, I assumed it should work. I can successfully use a token, for example, to list all my repos. ``` gh auth status ``` shows ``` github.com ✓ Logged in to github.com as ivinskyi (GITHUB_TOKEN) ✓ Git operations for github.com configured to use https protocol. ✓ Token: ******************* ``` I then run ``` gh auth setup-git ``` to use github token credentials from `gh`. Then, ``` git push ``` Fails with ``` remote: Write access to repository not granted. fatal: unable to access 'https://github.com/ivinskyi/my_repo/': The requested URL returned error: 403 ``` I tried to repeat the same steps on my dev machine and pushing changes works from my laptop.
himesh-cm commented 2 years ago

Duplicate #1033 Please refer to the above link, and let's use the discussion board for queries.