You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, here's a snippet of my implementation of this action: - name: repo-sync
uses: wei/git-sync@v1
env:
SOURCE_REPO: "git@github.com:hopeonesource/hopeonesource.org.git"
SOURCE_BRANCH: ${ GITHUB_REF:11 }
DESTINATION_REPO: "codeserver.dev.[redacted]@codeserver.dev.[redacted].drush.in:2222/~/repository.git"
DESTINATION_BRANCH: ${ GITHUB_REF:11 }
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY_PANTHEON_REMOTE }}
with:
args: $SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH
The secret exists, however I am getting both a Permission Denied (public key) message as well as the following:
SOURCE=git@github.com:repo/repo.git:${
DESTINATION=git@github.com:GITHUB_REF:11.git:}
Warning: Permanently added 'github.com,140.82.114.4' (RSA) to the list of known hosts. git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: src refspec ${ does not match any
error: failed to push some refs to 'git@github.com:GITHUB_REF:11.git'
##[error]Docker run failed with exit code 1
What am I doing wrong? It's tough to find documentation on how env vars are supposed to be referenced.
The text was updated successfully, but these errors were encountered:
Both, source and destination, repositories are synced over SSH protocols. Currently you are only allowed to add a single SSH_PRIVATE_KEY. So, you are trying to use the same private key to read repo from github and to push repo to codeserver. You have got a few options to fix this.
Add your public key to "Deploy key" on your Github project.
Use this as your source: https://$GITHUB_TOKEN@github.com/hopeonesource/hopeonesource.org.git <- I haven't tried this. So, not hundred percent sure that this will work as is. May be there is a few more changes that you would need.
Create a pull request that will allow using two different keys. One for source repo and second for destination repo.
Hi, here's a snippet of my implementation of this action:
- name: repo-sync
uses: wei/git-sync@v1
env:
SOURCE_REPO: "git@github.com:hopeonesource/hopeonesource.org.git"
SOURCE_BRANCH: ${ GITHUB_REF:11 }
DESTINATION_REPO: "codeserver.dev.[redacted]@codeserver.dev.[redacted].drush.in:2222/~/repository.git"
DESTINATION_BRANCH: ${ GITHUB_REF:11 }
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY_PANTHEON_REMOTE }}
with:
args: $SOURCE_REPO $SOURCE_BRANCH $DESTINATION_REPO $DESTINATION_BRANCH
The secret exists, however I am getting both a Permission Denied (public key) message as well as the following:
SOURCE=git@github.com:repo/repo.git:${
DESTINATION=git@github.com:GITHUB_REF:11.git:}
Warning: Permanently added 'github.com,140.82.114.4' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: src refspec ${ does not match any
error: failed to push some refs to 'git@github.com:GITHUB_REF:11.git'
##[error]Docker run failed with exit code 1
What am I doing wrong? It's tough to find documentation on how env vars are supposed to be referenced.
The text was updated successfully, but these errors were encountered: