remote: Repository not found. GitHub Action

Viewed 56

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:

enter image description here

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.

1 Answers

I am sure your token is invalid.

There are the posibilities:

  • You don't sent token
  • You sent token but in invalid name
  • You sent invalid/expired token
Related