简体   繁体   中英

remote: Repository not found. GitHub Action

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:

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

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM