-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A note regarding baseURL's for enterprise Github instances. #958
Comments
Thank you, @vanugrah! We definitely want to make life easier for Enterprise GitHub users of this package. We would greatly appreciate PRs that would help others to reduce or eliminate their pain points. If you or others could create these PRs (who are actually using this package with Enterprise GitHub), that would be excellent. Also, wouldn't the |
Thanks for the reply @gmlewis - I'll submit a PR shortly. And you're right about the baseURL, it should be |
To whomsoever it may concern,
There is an important caveat regarding the baseURL when creating clients for enterprise Github instances ( for example with the NewEnterpriseClient method).
The baseURL of the public facing API is simply:
https://api.github.com/"
However for enterprise Github instances the baseURL for the API is slightly different:
https://<mycompany>.github.com/api/v3/"
Using a baseURL without the
/api/v3/
suffix will result in HTTP 406 Not Acceptable errors and lead you down a path of debugging Oauth clients and request headers. I learnt this after many hours and tears.Documenting this as an issue to help others in the future. Perhaps we could add note on the godoc regarding the difference in baseURL structures between public and enterprise Github.
The text was updated successfully, but these errors were encountered: