github-sync: fatal: repository not found

Hi @wei. I’m hitting a snag setting up a workflow and I’m hoping you can help diagnose.

Here’s the error I’m seeing:

Screen Shot 2020-03-25 at 8 48 48 PM

I’ve tried setting the SOURCE_REPO secret in two formats:

  • https://<access_token>@github.com/github/help-docs.git
  • https://zeke:<access_token>@github.com/github/help-docs.git

but either way I’m getting this output:

UPSTREAM_REPO=***
BRANCHES=master:repo-sync
remote: Repository not found.
fatal: repository 'https://github.com/github/help-docs.git/' not found

Here’s the workflow file:

name: Repo Sync

on:
  schedule: 
  - cron: "0 * * * *" # every hour, on the hour

jobs:
  repo-sync:
    name: Repo Sync
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: repo-sync/github-sync@v2
      name: Sync repo to branch
      env:
        GITHUB_TOKEN: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}
      with:
        source_repo: ${{ secrets.SOURCE_REPO }}
        source_branch: master
        destination_branch: repo-sync
        github_token: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}
    - uses: repo-sync/pull-request@v2
      name: Create pull request
      env:
        GITHUB_TOKEN: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}
      with:
        source_branch: repo-sync
        destination_branch: master
        github_token: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}

The ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC secret, as its ridiculously long name suggests, is a token with repo and workflow scope created with my @zeke account, so it should have access to that repository.

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Looks like GitHub actions automatically set extraheader basic authorization header

This is introduced by Checkout V2, and is controlled by its persist-credentials option.

Works in my case. Thanks @wei

Thanks @wei! I will give this a try soon and get back to you.