devhomegithubextension icon indicating copy to clipboard operation
devhomegithubextension copied to clipboard

Cannot clone the public repo of an org without granting full org access

Open sylveon opened this issue 2 years ago • 4 comments

Dev Home version

0.503.261.0

Windows build number

10.0.22621.2361

Other software

No response

Steps to reproduce the bug

  1. On your account, have an org you own with a public repo on it. Make that membership public.
  2. Link Dev Home to GitHub, but don't grant access to that org.
  3. Try to clone the repo through Dev Home, via the "accounts" tab

Expected result

I expected to find that repo in the accounts tab, since it is public, and I am publicly member of that organization

Actual result

The repo is missing.

Included System Information

No response

sylveon avatar Sep 28 '23 07:09 sylveon

This was a GitHub access problem where having org repo access causes you to lose access to the org's public repos.

@dkbennett Did we have a way to fix this by using a public-only client for public repositories?

vineeththomasalex avatar Dec 13 '23 18:12 vineeththomasalex

Public client could be used for public repositories as a fallback (this logic exists already), however the rate limit on public client is extremely low. I doubt more than one widget for a repository using the public client can be used without hitting the rate limit.

The rate limit for an authenticated user is 5000 requests per hour. The rate limit for unauthenticated user is 60 per hour. Two orders of magnitude difference. It's very easy to eat up rate limit for the public (unauthenticated) client.

dkbennett avatar Jan 10 '24 18:01 dkbennett

Not trying to use it for widgets, just want to clone it.

sylveon avatar Jan 10 '24 22:01 sylveon

@dhoehna Do we have the same logic for Repo cloning?

vineeththomasalex avatar Jan 22 '24 18:01 vineeththomasalex