When executing a build for git repository giantswarm/docs-content
in CircleCI, I'd like to push a commit to another repository giantswarm/docs
.
I have this in the deployment
section of circle.yml
:
git config credential.helper cache
git config user.email "<some verified email>"
git config user.name "Github Bot"
git clone --depth 1 https://${GITHUB_PERSONAL_TOKEN}:x-oauth-basic@github.com/giantswarm/docs.git
cd docs/
git commit --allow-empty -m "Trigger build and publishing via docs-content"
git push -u origin master
This fails in the very last command with this error message:
ERROR: The key you are authenticating with has been marked as read only.
fatal: Could not read from remote repository.
The GITHUB_PERSONAL_TOKEN
environment variable is set to a user's personal access token, which has been created with repo
scope to access the private repo giantswarm/docs
. In addition, I added the user to a team that has admin permissions for that repo.
That series of commands works just fine when I execute it in a fresh Ubuntu VM. Any idea why it doesn't on CircleCI?
ERROR: Repository not found. fatal: Could not read from remote repository.
git@github.com:giantswarm/docs.git
with SSHgit push
using a personal access token). I didn't change anything, but all builds after that have been failing with the error you mentioned.