Skip to content

Username/password authentication fails for GitHub Enterprise #2064

Closed

Description

@omgitsads

Description

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

  1. Open GitHub Desktop
  2. Preferences -> GitHub Enterprise -> Sign In
  3. Enter GitHub Enterprise url
  4. Enter username/password credentials.
  5. 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"

Activity

  1. shiftkey commented on Jun 20, 2017

    @shiftkey
    Member

    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!

  2. added
    bug
    on Jun 20, 2017
  3. self-assigned this
    on Jun 21, 2017
  4. locked as resolved and limited conversation to collaborators on Jul 21, 2018
  5. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions