I am currently developing pipelines using GitHub action and in this process I am trying to push code from the template branch of repos A to the dev branch of repos B using a GitHub Action workflow.
For this, I used the following code:
git config user.email "${{ github.event.inputs.email }}"
git config user.name "${{ github.event.inputs.user }}"
git remote -v
git remote add origin2 https://${{ github.event.inputs.TOKEN }}@github.com/${{ github.event.inputs.org }}/${{ github.event.inputs.repos }}.git
git remote -v
git pull
git checkout template
git push -f origin2 template:${{ env.dev }}
As you can see I fully parameterize the code to make it dynamic.
The problem is that once this code is executed, the GitHub Action console gives me the following error:
The snowflakeTestRepos
repository does however exist in the samyKheznadji
organization.
I don't understand why it doesn't work knowing that when I run it locally it works.
Thanks for your help:)
I tried to create the remote origin2 with a Personal Access Token with full access. The repository is private.
I am sure your token is invalid.
There are the posibilities:
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.