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 6 years ago
- Reactions: 316
- Comments: 209 (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 6 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 5 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 4 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 4 years ago
- Add read permission for flux local diff workflow - This is needed for private repos as setting the permission overwites ALL permissions. - See https://github.com/actions/checkout/issues/254#issuec... — committed to Jimver/cluster-template by Jimver 2 years ago
- Add read permission for flux local diff workflow (#1742) - This is needed for private repos as setting the permission overwites ALL permissions. - See https://github.com/actions/checkout/issues/25... — committed to onedr0p/cluster-template by Jimver 2 years ago
- workflows: publish: fix permissions (again) github is retarded https://github.com/actions/checkout/issues/254 Signed-off-by: blacksuan19 <abubakaryagob@gmail.com> — committed to Blacksuan19/structx by Blacksuan19 2 years 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: readpermission like so:It also works if you remove the
permissionskey (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
permissionskey, hence my Github Actions stopped working withRepository not found.error. To fix the error you have to redefine the default permissions.Your
permissionsshould 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: readpermission.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.
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
permissionsconfigured:I got the “repository not found” error, to which this thread helped me by suggesting I add the
contents: readline:Seemed to work! Thanks all.
Resolved my issue
and here where to use it:
BRUHHHHh, why do they always do this on Fridays !!!
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)
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 permissionsin your workflow console.Your workflow should show the
contents: readpermission 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 thecontentskey is present among the other permissions you want to grant since the use of this key will remove all default permissions.This worked for me!! Thanks much!
It is still a issue
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.
+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/
Me 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.
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
@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…
For everybody still getting
Unable to resolve action xxx, repository not foundwhen 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:
Guys, just specify a custom token as suggested above. So your workflow should look like this:
And be sure that this token has permissions
repoto access the private repo that you want to checkout from.Github Actions has an incident atm https://www.githubstatus.com/incidents/vts24q167tc8
I am still getting this issue and mine is a private repo from which I am trying to pull and I tried the permissions fix which was suggested by others and still seeing the issue
I found that for jobs with any permissions set, I need to set other permissions, too; otherwise, they will default to
none.To fix the checkout issue, I added
contents: readto permissions, which works for me.For reference:
👆🏼 from Defining access for the GITHUB_TOKEN scopes
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.
+1 also just started to happen on our private repos
I ran into this issue when I added permissions to my job.
To one of my jobs. I am under the assumption, jobs have a default set of permissions that when you add the Permissions field, it overwrites. So what you need to do is simply add the Permission for you Github action Job to read from your private repo. Double check all permissions and you should be good to go 💯
Here is a list of all Permissions I could find:
Here is a nice article explaining permissions in github actions: https://dev.to/pwd9000/fgjgghjgh-19ka
Hope this helps 🫡
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
Just had this issue when trying to deploy a private repo and this comment helped me, using v4 actions.
I’ve wasted hours and trawled through 4 years worth of comments and attempted solutions… the error messages need to be more descriptive for this and not just “Repo Not Found”.
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 joband the permissions assigned to theGITHUB_TOKENpermissions.Issue still persisting as of 11:16AM EST
@DgRosa Can we re-open this issue? Still failing.
Thank you!
Ran into this issue today. Generate a personal access token with read permission for both the repository you are trying to install as a package as well as the repository the action is for. In your deploy.yml explicitly set the token like so. Also in the repository you are trying to install, go to settings -> actions -> general -> access -> click the radio option that says “Accessible from repositories in the ‘abc’ organization” and save
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.
Why is this issue closed? Seems like a lot of people, myself included, are still having this issue?
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:
I am also having this exact same issue. It started appearing somewhere in the last hour to our private repos.
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: readinside 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
@v2and 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/
in my case both the main repo and sub module repo are in the same organization but still its failing in github actions and works fine in local
I wish github can provide a better error message regarding this issue. It’s really the
permissionsthat’s causing thisUpdating the permissions as described above does not work for a private repo.
I’m having this issue with both
actions/checkout@v3andactions/checkout@v4we’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
working for me now on private repos
Ya, its working prefectly
I’m experiencing the same.
You’re right, not working again…
Pretty sure it has nothing to do with the checkout action. The latest code change is yesterday, but it was running fine this morning.
Just ran into this issue today with a company github repo. Still have not find a solution.
@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/actionsand setORG_TOKENto the newly created token. Then useORG_TOKENinstead ofGITHUB_TOKENin problematic places.Where are you putting this section? Under
runs-onwithin jobs?Unfortunately this is happening when accessing the very private repo the workflow is in, no
repositoryparameter 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 @yurist38@jayconscious If I remember it correctly the issue was fixed for me when I switched from using the general
GITHUB_TOKENto a self-created secret token https://docs.github.com/en/actions/reference/encrypted-secrets.Not working for any of my private repos
Oof, I thought my private repo has been banished to the shadow realm. Gave me a scare!
We can start to subscribe to the issue with this button without adding a comment.
I think this issue needs to be re-opened. Enabling
Accessible from repositories in the '<Organization name>' organizationhas 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 againI 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@v1andactions/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
Same.
Seems to still be an issue
I solved my problem, passing the secrets from the called workflow to the called workflow.
My context is enterprise internal repositories.
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_TOKENworked. This issue seems to be a problem withGITHUB_TOKENspecifically.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@v4while 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: readdid 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 foundor 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.