You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Username/password authentication fails for GitHub Enterprise #2064
When using a username/password combination to authenticate with a GitHub Enterprise appliance, GitHub desktop always returns a 403 response.
This is caused by GitHub Desktop using an incorrect URL when attempting to create a new OAuth Authorization.
GitHub Desktop performs a POST request to https://[hostname]/api/authorizations, instead of the correct https://[hostname]/api/v3/authorizations.
Log files from HAProxy on the appliance below show this.
Version
GitHub Desktop version: 0.6.1
OS version: OS X 10.12.5 - Also reported on windows
Steps to Reproduce
Open GitHub Desktop
Preferences -> GitHub Enterprise -> Sign In
Enter GitHub Enterprise url
Enter username/password credentials.
Click Sign In
Expected behaviour: User should be logged in.
Actual behaviour: User received following message:
The server responded with an error while attempting to authenticate (403)
Forbidden
Reproduces how often: 100%
Logs
GitHub Desktop Logs:
2017-06-20T15:32:31.418Z - error: [ui] Unable to deserialize JSON string to object [object Response]
SyntaxError: Unexpected token C in JSON at position 0
GitHub Enterprise HAProxy logs:
Jun 20 15:32:19 ghe-local haproxy[1366]: 192.168.2.56:65253 [20/Jun/2017:15:32:19.099] https_protocol~ web_unicorns/localhost 0/0/1/10/11 304 700 - - ---- 9/1/0/1/0 0/0 {ghe.local||Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) Ap} "GET /api/v3/meta HTTP/1.1"
Jun 20 15:32:31 ghe-local haproxy[1366]: 192.168.2.56:65263 [20/Jun/2017:15:32:31.382] https_protocol~ web_unicorns/localhost 0/0/1/25/26 403 1169 - - ---- 9/1/0/0/0 0/0 {ghe.local||Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) Ap} "POST /api/authorizations HTTP/1.1"
GitHub Desktop performs a POST request to https://[hostname]/api/authorizations, instead of the correct https://[hostname]/api/v3/authorizations.
@omgitsads excellent find, and thanks for the detailed report!
Activity
shiftkey commentedon Jun 20, 2017
@omgitsads excellent find, and thanks for the detailed report!