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:

I’ve tried setting the SOURCE_REPO secret in two formats:
https://<access_token>@github.com/github/help-docs.githttps://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
- fix: allow basic auth header overwrites GitHub Actions automatically set basic auth header overwriting access tokens supplied in HTTPS clone urls. Fix #18 — committed to repo-sync/github-sync by wei 4 years ago
- fix: allow basic auth header overwrites (#21) GitHub Actions automatically set basic auth header overwriting access tokens supplied in HTTPS clone urls. Fix #18 — committed to repo-sync/github-sync by wei 4 years ago
- docs: add persist-credentials: false Fixes #18 — committed to repo-sync/github-sync by wei 4 years ago
This is introduced by Checkout V2, and is controlled by its
persist-credentialsoption.Works in my case. Thanks @wei
Thanks @wei! I will give this a try soon and get back to you.