'NextJS Deployment Error : The repository couldn't be found in your linked GitHub account
I am unable to deploy my React NextJS app of vercel. It gives the below error while clicking the deploy button :
The repository "NetflixCloneReact" couldn't be found in your linked GitHub account.
While my repo is public: https://github.com/karankumarshreds/NetflixCloneReact
Please help!
Solution 1:[1]
I got the same error.
Go to GitHub -> Settings -> Applications -> "Configure" button near Vercel -> Repository access. Either check "All repositories" or "Only select repositories" and choose your current repo for Vercel to access.
Solution 2:[2]
This might sound strange but this seems to be happening only on windows machine. This is because of a weird way how the powershell works.
It considers "Directory_name" === "directory_name".
So when I changed my directory to the project folder, it was named as "reactApp19", but while typing the folder name, I wrote reactapp19. Which powershell ignored and i opened VSCode further from command line and ran the next server.
This must have resulted in mismatch in the project's name and the directories name. I don't know why though, after reading alot of threads:
- I did cd reactApp19 (with proper casing this time)
- Ran the next server again
And it fixed the issue!
Solution 3:[3]
In my case it was due to changing permissions for some developers!
I am quoting this from Vercel website:
Lost Git Repository Access
In order for Vercel to be able to deploy commits to your Git repository, a Project on Vercel has to be connected to it.
This connection is interrupted if the Git repository is deleted, archived, or if the Vercel App was uninstalled from the corresponding Git account or Git organization. Make sure none of these things apply.
Additionally, when using GitHub, the connection is also interrupted if you or a member of your team modifies the access permissions of the Vercel GitHub App installed on the respective personal GitHub account or GitHub organization.
To verify the access permissions of the Vercel GitHub App installed on your personal GitHub account, navigate to the "Applications" page and select "Vercel" under "Installed GitHub Apps". You will see a list of Git repositories that the GitHub App has access to. Make sure that the Git repository you're looking to connect to a Vercel Project is listed there.
To verify the access permissions of the Vercel GitHub App installed on your GitHub organization, select "Vercel" under "Installed GitHub Apps" in the organization settings. You will see a list of Git repositories that the GitHub App has access to. Make sure that the Git repository you're looking to connect to a Vercel Project is listed there.
Reference: https://vercel.com/docs/platform/frequently-asked-questions#lost-git-repository-access
Solution 4:[4]
In order to fix this issue. There are a number of things that I did.
Download the vercel app on github (https://github.com/apps/vercel).
Go into your github settings and navigate to the "Applications" page and select "Vercel" under "Installed GitHub Apps". You will see a list of Git repositories that the GitHub App has access to. Make sure that the Git repository you're looking to connect to a Vercel Project is listed there.
Go to https://vercel.com/ and sign up (using your github account)
re-run the vercel command in your project folder and it should work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Karan Kumar |
Solution 3 | Mohammad Tbeishat |
Solution 4 |