"No repositories found" during site creation

I am trying to change the repository that my project is attached to on Netlify. However, although Netlify is clearly connected to my public Github repos, it says that it cannot find any repositories at all when I go to change the association for a project or to start a new project.

Screen Shot 2020-04-22 at 10.16.47

hi there, what happens when you click “configure netlify on github?”

I am taken to this page, click to Save, and then the process repeats by going back to the Netlify page above. I have also tried uninstalling and reinstalling Netlify.

ok, thats as it should be! just trying to rule some stuff out here. last question: does it work better when you are in an incognito window? sometimes browser extensions create all kinds of odd behaviour, and the easiest way to test is to try incognito.

Thank you for your help. I have tried both Firefox and Chrome in standard and in Incognito/Private mode. The issue does not resolve in any of those cases. :slight_smile:

ok, that’s good to know. have you tried selecting “only select repositories” and then chosing the one you want to link"? does that change the behaviour at all?

I did try that - no change to the behavior.

I have done the following to see if any of them would resolve the issue:

  • Log in and out of Netlify.
  • Log in and out of GitHub.
  • Uninstall and reinstall the Netlify app on GitHub.
  • Give full permissions to the Netlify app (this is what it had already).
  • Limit permissions to just the two repositories that I want to switch between or give access to build from.
  • Use normal and then private/incognito mode to do all of the above.
  • Note that these repositories are all public.

The only other thing that I can think of is that the app is installed in my personal account and that I am also members of a few other groups, such as Jenkins X - the public project. My personal org/account has been where the app has been previously building from (and still is pulling from there - I just can’t add new projects from GitHub or change from one repo to another in an existing project).

Hey Jenn and thanks for trying all those things! Many of those would have been our Support team’s guidance as well.

Usually we’d see some indication that the GitHub app was in place on your repos in our database; this does not seem to be the case for any of your sites, which are all connected to repos within your personal GH account. I wonder if you see the “install the github app” call to action still, in other parts of our UI than site creation? (I think you should).

Worst case, to get you unblocked today, if you want to make a new drag and drop site (create a new site not linked to git), I can help get that configured the “old way”, with webhooks and deploy keys. This isn’t a solution, but it may be a week or so before we can plumb the expertise of the GitHub app guru for advice so I don’t want you waiting that long to set up a site!

Our dev team did request a peek at the browser dev tools view of the XHR request to github - it’ll be something like https://api.github.com/user/installations/repositories and we are curious if it returns any data, or no data. I wouldn’t post the response here since it will potentially include sensitive data! Just knowing if it is a success (what’s the HTTP status?) and whether a bunch of JSON data comes back, or maybe just some error message or no response at all.

Thanks in advance for that help!

Hi @jennbriden,

Thanks so much for filing the issue and sorry to hear that things aren’t working quite as expected! As @fool mentioned, we’d like to know if the GitHub API we use to fetch repositories is returning anything back to the Netlify app. The GitHub API documentation has a response example for how this should look – there should be a “total_count” value 1 or more. If what you’re seeing when you inspect the response via your browser developer tools is similar then this will give a better idea on root cause.

To see the network request in action you can follow these steps:

1.) Go to repository settings edit page
2.) Open up your browser developer tools (Chrome or Firefox work best for this)
3.) Find the “Network” tab and filter on “XHR” requests.
4.) Click on the Github provider from the provider list in the Netlify app
5.) In your network tab on your developer tools, you should see a request similar to https://api.github.com/user/installations/{installation_id}/repositories and be able to view the response data.


1 Like

The request returns a 502.

Request URL

Request headers
GET /user/installations/8228758/repositories?page=1&per_page=25&v=1588034347473 HTTP/1.1
Host: api.github.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0
Accept: application/vnd.github.machine-man-preview+json
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: Netlify App
Content-Type: application/json
Authorization: token 7c2f23678865f0b7e88d883fa00695e81821b270
Origin: https://app.netlify.com
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

Response headers
HTTP/1.1 502 Bad Gateway
Server: GitHub.com
Date: Tue, 28 Apr 2020 00:39:17 GMT
Content-Type: application/json
Content-Length: 32
ETag: “5ea779cb-20”
Vary: Accept-Encoding, Accept, X-Requested-With
X-GitHub-Request-Id: CB75:5C52:C320:1D441:5EA77B2B

“message”: “Server Error”

Hi jenn,
are you still seeing this issue? we’ve been poking around at this internally and, as frustrating as this is to acknowledge, a 502 error on GitHub’s side is unfortunately not something we can fix - if you google “github api 502” you will see that is not an uncommon issue and there is no specific resolution.

We aren’t seeing reports of this behaviour with other customers, hence me asking if you are still seeing the error. You might try and see if you can get in touch with GitHub in some way to ask for more information.

The only other thing we can think of is to check your local network settings. If you try and access things through a different network (such as thru your phone) does it work?

Sorry we don’t have any better ideas at this time. :confused:
If none of this works, you might try hosting your repo with BitBucket or GitLab to see if that works better.

I have the exact same issue with bitbucket. It’s a real pain…

I can’t see repositories that are linked to the organization but only that are linked to my personal account.

Hi, @adam.genshaft. Are you an admin role on the Bitbucket organization? If not, would you please make that change and let us know if it resolves the issue or not.

Thanks @luke, I am an admin, but I don’t see this organization at all.

Hey @adam.genshaft,

Let’s keep the conversation streamlined here: Failed during stage 'preparing repo'