jspm / github

Github Location Service
16 stars 43 forks source link

406 error when installing private repositories from an organization #55

Closed tengyifei closed 9 years ago

tengyifei commented 9 years ago

jspm version: 0.15.6 jspm-github version: 0.11.6

Have setup and tested Github credentials, and they have repo permission.

jspm says:

warn Error on download for github:<organization>/<repo-name>, retrying (1).
     Download: Bad response code 406
guybedford commented 9 years ago

Perhaps that isn't enough permissions as it will still try to use the GitHub release API to list any published releases.

Have you tried increasing the permissions?

tengyifei commented 9 years ago

I tried again with every single item checked, still to no avail. If I check repo then public_repo will remain unchecked. If I check public_repo by unselecting repo, jspm will report that the private repository is not found.

tengyifei commented 9 years ago

Relevant line could be https://github.com/jspm/github/blob/master/github.js#L565

guybedford commented 9 years ago

Are you perhaps able to try using curl against that URL directly?

guybedford commented 9 years ago

@tengyifei did you manage to make any progress here?

guybedford commented 9 years ago

@tengyifei did you say this was GitHub enterprise? The truth is we haven't had direct access to a GitHub enterprise setup to test this use case entirely, but have just relied on community contributions. Would love to sort it out if you're interested in pursuing this further.

tengyifei commented 9 years ago

Hey sorry for the delay. I was trying hard to reproduce this problem but it seems to have disappeared after I removed all node_modules and reinstalled jspm. Nonetheless when I tried to access https://<username>:<password>@github.com/<organization>/<repo>/archive/<version>.tar.gz Github gave me a 406 error.

$ wget https://<username>:<password>@github.com/<organization>/<repo>/archive/<version>.tar.gz
--2015-06-08 14:01:22--  https://<username>:<password>@github.com/<organization>/<repo>/archive/<version>.tar.gz
Resolving github.com... 192.30.252.131
Connecting to github.com|192.30.252.131|:443... connected.
HTTP request sent, awaiting response... 406 Not Acceptable
2015-06-08 14:01:22 ERROR 406: Not Acceptable.

I'd love to help on Github Enterprise but we are on the official Github server right now. I'll close this but will keep you posted if the problem resurfaces.

guybedford commented 9 years ago

Glad to hear it is working ok now - yes private GitHub is tested and working though.