checkout: repository not found
[edited by @ericsciple] Sorry for the disruption. There is an active incident right now that is causing the GITHUB_TOKEN to not have permission to checkout private repos.
Everything was working fine until all of the sudden this error started to popup and I have no idea why. Can it be a GitHub service issue or maybe a recent release that introduced a bug. It’s a private repository I don’t know if that can help debug the issue.
Workflow stack
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +7f692a64151c6ae3be4518df16d88b891eb76c1b:refs/remotes/origin/master
remote: Repository not found.
##[error]fatal: repository 'https://github.com/DgRosa/likacrm/' not found
The process '/usr/bin/git' failed with exit code 128
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 283
- Comments: 195 (3 by maintainers)
Commits related to this issue
- try and fix issues with permissions on checkout this is possibly due to https://github.com/actions/checkout/issues/254 — committed to Interactions-AI/odin by dpressel 4 years ago
- action - Add GIT_PAT to checkout Hopefully fixes the workflow error we're currently getting: "Error: Unable to resolve action `quantargo/action-course-deploy@v1.2.0`, repository not found" See https... — committed to quantargo/action-course-deploy by christiankaindl 3 years ago
- fix: add read permission to repo contents to fix commitlint action thanks to https://github.com/actions/checkout/issues/254#issuecomment-899182888 — committed to beuss-git/bachelor-oppgave-nina by beuss-git a year ago
- fix: add read permission to repo contents to fix commitlint action thanks to https://github.com/actions/checkout/issues/254#issuecomment-899182888 — committed to beuss-git/bachelor-oppgave-nina by beuss-git a year ago
Ran into this, but noticed I no longer get the issue after enabling all the permissions. After some debugging I found a fix: explicitly define the
contents: read
permission like so:It also works if you remove the
permissions
key (by default the bare minimum permission iscontents: read
).@GitHub Team - that’s why you don’t do deployments on Friday 😁
EDIT: November 27th 2020 - repeat error & they did it again on Friday 🤦 😂
Thanks for the fix!
For everyone coming from Google, here is the explanation.
I followed this guide to setup configure-aws-credentials action. One of the requirement is workflows or jobs needs
key. This overrode default
permissions
key, hence my Github Actions stopped working withRepository not found.
error. To fix the error you have to redefine the default permissions.Your
permissions
should look like this:It’s reporting the same error again…
If you are getting this error when trying to checkout the repo your action is running in, make sure your job has sufficient permissions.
In my case, I changed the job permissions, like below:
Which seems to have overwritten the default
contents: read
permission.Fix:
This fixed my issue.
I think it’s something to do with private repos? I just reran some public repo actions and they worked correctly, but my private repos are failing every time.
BRUHHHHh, why do they always do this on Fridays !!!
For anybody running into this issue in 2023, it is likely caused by downtime of the GitHub API or insufficient workflow permissions. You can check your workflow permissions by going to
Set up job>GITHUB_TOKEN permissions
in your workflow console.Your workflow should show the
contents: read
permission here. This permission is automatically granted unless you overwrite your workflow permissions using the github action permissions key. In that case you have to make sure thecontents
key is present among the other permissions you want to grant since the use of this key will remove all default permissions.Please use emojis to react and add comments only to provide new information. Most of us receive a tons of emails due to the subscribe.
I fully agree that this isse needs to be re-opened. The fix from @donovanclarke doesn’t seem to work anymore. FYI. I am the only user for my own namespace and the owner for my org account. Irrespective of whatever I try, I am unable to access a private repo from my org namespace in my user namespace’s workflow
+1 on this. Github actions suddenly started giving this error. “Investigating - We are investigating an increase in errors on GitHub.com.” I think this is due an error in github. Check https://www.githubstatus.com/
I’m working in a private repo which is part of an org with SSO enabled. I’m using an action which sets PR comments so had
permissions
configured:I got the “repository not found” error, to which this thread helped me by suggesting I add the
contents: read
line:Seemed to work! Thanks all.
@Siddharth-Ashri use the default token but add the permissions required:
It works now 😃
-> so everyone’s running to hit the PUSH button 🤣
Seems to be working now 😄
Let me post it again. Guys, just use a custom token for this. You don’t have to implement the wheel here, it works just fine with a custom token, not the one provided by the github automatically. I think there is nothing to fix here, please don’t expect any official fixes. The issue is closed for a long time already…
Guys, just specify a custom token as suggested above. So your workflow should look like this:
And be sure that this token has permissions
repo
to access the private repo that you want to checkout from.For everybody still getting
Unable to resolve action xxx, repository not found
when using a private action:Go to the private action repo, Settings, General. There, allow the repo to be accessed by other personal or organizational repos:
Resolved my issue
and here where to use it:
Github Actions has an incident atm https://www.githubstatus.com/incidents/vts24q167tc8
I am running into this issue as well. Pipeline output:
Thanks for this issue! I literally merged our first workflow 90 minutes ago and have been debugging the broken CI ever since. Knowing it’s service degradation is of some relief.
The issue re-appeared for me today Aug 12th 2022 in one of our internal org repository pipelines. Am I the only one or is anybody else affected as well?
Pipeline error message:
Configuration in our .yml file:
Not working for private repo
+1 also just started to happen on our private repos
Using
token: ${{secrets.TOKEN}}
with a Personal Access Token with permissions to read the repo contents/commits did fix it for me. See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token for creating the token.same issue – the problem happens only when you need to deploy a hotfix 🤣
@ilgooz there is an ongoing investigation - it’s known. Not an issue w/ this repo as you mentioned.
Just wanted to say that this comment here helped fix the issue.
Though to debug possibly why this is happening, it would be helpful to check the
Setup job
and the permissions assigned to theGITHUB_TOKEN
permissions.Issue still persisting as of 11:16AM EST
@DgRosa Can we re-open this issue? Still failing.
I all of a sudden ran into this issue today, when attempting to apply this action to an company internal github repo.
Changing
permissions: actions: read pages: write id-token: write
to
permissions: actions: read contents: read pages: write id-token: write
seems to have fixed it for me at least.
(using actions/checkout@v3)
I am also running into this issue today. But not sure if my cause is the same. I am setting up a runner that checks out 2 git repos. It succeeds on getting the repo where the action is located, but fails in the same manner on the 2nd repo.
Pipeline output:
yml:
Why is this issue closed? Seems like a lot of people, myself included, are still having this issue?
After going through the comments it is not clear what to do to solve the issue.
I have configured
Accessible from repositories in the .... organization
, I have a token withrepo
, enabling workflow read and write permissions, addingpermissions: contents: read
inside thejob
, and addinggithub_token: ${{ secrets.MY_TOKEN }}
in thewith:
section.After all that I am still getting the error
remote: Repository not found.
is there anything missing?Go to project settings in the respective github repo -> On the left menu, select Actions -> General -> In Workflow permissions, select Read and write permissions -> Re run failed jobs it should work
I would love to take a break but it works for me 😢
Same - time for me to take a break and walk my imaginary dog 🐶
Probably due to an issue with Github APIs. We are using a fixed version of checkout which is
@v2
and still experiencing this issue.@ericsciple can you please report this issue to the team?
I got more news, the status page is yellow, there seems to be an incident ATM. See: https://www.githubstatus.com/
I am also having this exact same issue. It started appearing somewhere in the last hour to our private repos.
These workaround are not working for me either.
Both repositories are in the same organization. And the second repo is configured to be available to workflows in the org (I have also tried setting it to be available to workflows enterprise wide but to no difference in outcome). My workflow still says the repo was not found. If i make the repo public it works, and if i set an organizational token (which i cant make last longer than 90 days), then it works fine.
we’re experiencing this issue too, which sucks cause I would much rather use the GITHUB_TOKEN secret for actions rather than a PAT. Is there any word on if this is being fixed and if not is there a reason (like low priority since there’s a feasible, yet less optimal in some ways workaround)? I’d imagine most github actions workflows involves checking out the current private repo so this would be a show stopper for many. It’s unfortunate cause I love the idea of using just the GITHUB_TOKEN and managing that tokens permissions in the YAML file itself
@jayconscious If I remember it correctly the issue was fixed for me when I switched from using the general
GITHUB_TOKEN
to a self-created secret token https://docs.github.com/en/actions/reference/encrypted-secrets.working for me now on private repos
Ya, its working prefectly
I’m experiencing the same.
Pretty sure it has nothing to do with the checkout action. The latest code change is yesterday, but it was running fine this morning.
Where are you putting this section? Under
runs-on
within jobs?Unfortunately this is happening when accessing the very private repo the workflow is in, no
repository
parameter is specified. The workflow simply can’t write back to the repo, it can only read. Personally I prefer not having to involve admins to create deploy tokens if it can be resolved this way, but it is a personal preference. Again, thanks for picking this up @yurist38Not working for any of my private repos
Oof, I thought my private repo has been banished to the shadow realm. Gave me a scare!
Right now
You’re right, not working again…
We can start to subscribe to the issue with this button without adding a comment.
I wish github can provide a better error message regarding this issue. It’s really the
permissions
that’s causing thisMe too. It used to work well, but started throwing this error from yesterday.
The workaround is add the contents permission, if it’s not there.
Just ran into this issue today with a company github repo. Still have not find a solution.
I think this issue needs to be re-opened. Enabling
Accessible from repositories in the '<Organization name>' organization
has no effect.Is this stil an issue, I am using actions/checkout@v4 and yesterday everything went fine but today it is failing with exactly this error:
Fetching the repository /usr/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* remote: Repository not found. Error: fatal: repository 'https://github.com/hamburgcodingschool/website/' not found The process '/usr/bin/git' failed with exit code 128 Waiting 18 seconds before trying again
I was also experiencing this issue with actions/checkout@v4 and explicitely granting the job read permissions to the content solved it as @donovanclarke proposed:
@MiltiadisKoutsokeras can you copy your workflow file including the permissions definition?
It still doesn’t work, even specifying the permissions
While waiting for an ufficial fix, I resolved it by changing the way the runner authenticates to the repo by using this step.
This works for both
actions/checkout@v1
andactions/checkout@v2
(haven’t tested others).same Been having this issue despite enabling the options down below in both the organization repository and the forked repository.
If I am using it wrong is there another way to fetch a private forked repository. Our organization has forked repo + pull_request model and I am trying to lint my code on the forked repo based on the logs the Actions do have the write permission on the forked repo but cannot find the repo itself.
The only solution I have found is by creating a PAT in the forked repo and then using that as an environment secret but that isn’t scalable to other forks of the repository.
Not working for me.
Unable to resolve action
GoogleCloudPlatform/google-github-actions@master
, repository not foundJust faced this error too on a private repo…
[UPDATE] I’ve just managed to fix it by specifying another token explicitly. 🎉 Try that too! 😉
🍿
Same issue here
@stauffenberg2020, go to https://github.com/settings/tokens and create a new token. Set no expiration date, and click on the “repo” scope in access permissions. Then go to
https://github.com/organizations/<your-organization>/settings/secrets/actions
and setORG_TOKEN
to the newly created token. Then useORG_TOKEN
instead ofGITHUB_TOKEN
in problematic places.Does anybody know an up-to-date workaround? Got this issue today. None of the above workarounds worked for me.
UPD: setting up a custom organization-level personal access token and using it instead of
GITHUB_TOKEN
worked. This issue seems to be a problem withGITHUB_TOKEN
specifically.Were you ever able to get this worked out? I was trying to set up a Secret with a PAT and noticed this message:
So I think that might be my problem, but I’ve been going down this rabbit hole for hours now 😦
@MiltiadisKoutsokeras
Interesting your GITHUB_TOKEN permissions seem off.
Though I did notice you are running
checkout@v3
, could possibly bumping tocheckout@v4
while usingI am taking a wild swing, but, i was having the issue you were having, and mine was resolved and this is the only thing i can possibly see that was different. Besides your GITHUB_TOKEN that you are using doesn’t have the appropriate permissions.
thank you @donovanclarke
contents: read
did fix our issueremote: Repository not found.
I’m using a private repo from a workflow in a public repo. I use deploy keys to grant access and bumped into the same issue. The output of a successful run shows:
The output of a failing run:
This is explained by the docs:
Hope it is helpful to someone
I noticed the following:
If repository checkout uses this command:
it fails, where the successful runs use this command:
The failing command seems to use a ref that is not part of a branch.
@jkruse14 Of course. See below our Github Action yaml (not verbatim copy in order to protect secrets) it fails on
Source Code checkout
:+1 It still happens on a private repository that uses deployment keys to access other private repositories. The GitHub action settings are set to:
Log error:
In my case, my workflow looked something like this:
I was under the incorrect impression that workflow level permissions propagated down. HOWEVER, leaving it out sets it to
none
, because I could not even read the repository. I was gettingremote: repository not found
or something to that effect.If you add permissions to your workflow make sure you all the permissions (its replacing not additive). Otherwise you’ll break like this.
Thanks @yurist38 . I have no problem with creating as many YOUR_SELF_MADE_TOKEN’s as I need in my own private repos but the problem rises when I need to automate package releases for the organisation I work for. Could you please provide a solution that doesn’t involve the user having to provide custom parameters and that simply leverages pre-existing secrets and env variables? Until then, please provide a fault in this solution so we can progress with this issue. Thanks for picking this up
Thanks anyway. If it will not work, I know now where the screw is.
I had @v1 on mine and switched to @master when I saw the problem happening but no luck. I think it’s related to the current github situation. https://www.githubstatus.com/
Same here. Issue with private repo deployment. Spent like and hour figuring it out. Feel like such an idiot not having a look here first!
Only affects our private repos, public ones still work fine.
Same for me
I’m experiencing this issue too! 👍
+1 . Same issue with GitHub Actions and private repos.