I am trying to fetch repositories using the GitHub API, but authentication fails when using my GitHub Enterprise credentials. My enterprise account has a higher rate limit, so I want to access global repositories (public and open-source projects) using the GitHub Enterprise API instead of the GitHub API.
How can I authenticate and use the GitHub Enterprise API to fetch repositories beyond my enterprise anization?
Is there a way to access global repositories while leveraging my enterprise account’s higher rate limits?
Are there specific headers or authentication mechanisms needed to make this work?
Any guidance on this would be greatly appreciated!
What I Tried
I attempted to use my GitHub Enterprise credentials (personal access token) to authenticate and fetch global repositories (public and open-source projects) via the GitHub Enterprise API endpoint (). I expected that my enterprise token, which has a higher rate limit, would allow me to query both enterprise-hosted repositories and global repositories on GitHub.
What I Expected to Happen
I expected the GitHub Enterprise API to act as a unified interface, allowing me to access both enterprise-hosted repositories and global repositories (e.g., public repositories on GitHub). Since my enterprise account has a higher rate limit, I assumed it would apply to all queries made through the enterprise API endpoint.
What Actually Resulted
Authentication failed when querying global repositories. The enterprise token only worked for repositories hosted on the GitHub Enterprise instance () and did not authenticate requests for repositories on GitHub. Additionally, the API returned no results for global repositories, even though they exist on GitHub.
I am a clear noob in github. Guidance will be really appreciated!
I am trying to fetch repositories using the GitHub API, but authentication fails when using my GitHub Enterprise credentials. My enterprise account has a higher rate limit, so I want to access global repositories (public and open-source projects) using the GitHub Enterprise API instead of the GitHub API.
How can I authenticate and use the GitHub Enterprise API to fetch repositories beyond my enterprise anization?
Is there a way to access global repositories while leveraging my enterprise account’s higher rate limits?
Are there specific headers or authentication mechanisms needed to make this work?
Any guidance on this would be greatly appreciated!
What I Tried
I attempted to use my GitHub Enterprise credentials (personal access token) to authenticate and fetch global repositories (public and open-source projects) via the GitHub Enterprise API endpoint (https://github.ecodesamsung/api/v3
). I expected that my enterprise token, which has a higher rate limit, would allow me to query both enterprise-hosted repositories and global repositories on GitHub.
What I Expected to Happen
I expected the GitHub Enterprise API to act as a unified interface, allowing me to access both enterprise-hosted repositories and global repositories (e.g., public repositories on GitHub). Since my enterprise account has a higher rate limit, I assumed it would apply to all queries made through the enterprise API endpoint.
What Actually Resulted
Authentication failed when querying global repositories. The enterprise token only worked for repositories hosted on the GitHub Enterprise instance (https://github.ecodesamsung
) and did not authenticate requests for repositories on GitHub. Additionally, the API returned no results for global repositories, even though they exist on GitHub.
I am a clear noob in github. Guidance will be really appreciated!
Share Improve this question asked Feb 23 at 13:40 Venkat BalajiVenkat Balaji 1 1- Please provide enough code so others can better understand or reproduce the problem. – Community Bot Commented Feb 24 at 8:53
1 Answer
Reset to default 1GitHub Enterprise is completely walled from GitHub (try to use your username/password from one to login to the other - it will fail).
Additionally relevant is that they aren't always identical from a technical standpoint. Updates and API changes roll out on different timelines, there are some API differences, etc. This would obviously cause problems if you were trying to access one via the API for the other.
Lastly, you have a higher rate limit on your companies Github because they have vetted you and trust you for access to their stuff. They also know who you are and have an employment relationship with you - i.e. if you decide to maliciously use these limits you will get disciplined or fired. GitHub as no such relationship with you and is tasked with managing access to the assets of 3rd parties on GitHub, not just their own. I see no reason to expect that your company would somehow be able to grant you higher limits on GitHub unless you work for Microsoft or a partner.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745152981a4613947.html
评论列表(0条)