-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
hub fork
fails when GHE returns 404
#660
Comments
@nikreiman Do you mind sharing the stacktrace if there's any? |
This is related to $ HUB_VERBOSE=true hub fork Hopefully it will at least print out the request/response without crashing. |
Hmm looking at the output, it seems that I get an HTML webpage redirecting to the login. So it's probably caused by 2-factor auth, which we do have in place in our GHE instance. I see that 2FA is supported (was fixed in #399), but I have no idea how to configure it. It's not documented anywhere. |
@nikreiman It's enabled by default. When you login, |
@jingweno yes, I was using hub 1.x from apt-get, but had problems with it and am now using one I built myself from the repo. As for |
@nikreiman If First of all, have you followed the instructions from the man page (also available online) to whitelist your GHE hostname for hub? Second, does hub prompt you for username/password when you run |
@mislav I've followed the instructions from the docs, my
When I attempt to run
So no, I'm never prompted for the 2FA token. A colleague of mine mentioned that I could manually set the token from GHE's apps page and put it in the |
@nikreiman It seems that something is broken during authentication with your GHE instance. Maybe instead of prompting you with 2FA code, the application redirects to some HTML page and that's why we get the You can put your OAuth token manually by saving this as ---
ghe.mycompany.net:
- protocol: https
user: nik
oauth_token: TOKEN Can you also tell me which GHE version are you running? Open its web interface in the browser and hover your mouse over the octocat icon in the footer. |
I just tried manually putting the 2FA token in
|
@mislav Sorry, forgot to include GHE. We have version 11.10.344. Some of my colleagues have supposedly gotten hub working, so I don't think it's a server thing. |
@nikreiman the token you'd need to put in ---
ghe.mycompany.net:
- protocol: https
user: nik
oauth_token: TOKEN You could follow this link to generate a oauth token. The link is for GH but it should apply to GHE. |
From #660 (comment), the colorized verbose output is broken. The old implementation tries to use ‘\e’ which is not recognized in a Go string. Let’s Use ‘\033’ instead.
@nikreiman I've found the broken code and fixed it in #669. The problem is when getting current user, |
GHE is using /api/v3 as the path prefix for all API URLs. There’s one miss case when getting current user. This is to fix #660 (comment)
@jingweno nice, looks like we finally found the root of the problem. :) Thanks for the fix! |
@nicklewis I've merged the fixes to master. Could you try |
I'm not using brew actually (I'm on Linux), so I just fetched
|
BTW should I open a new issue for this problem? |
Does |
|
The Ping @pengwynn for emotional support |
@nikreiman a couple of questions for ya:
curl -I -u username:$MY_TOKEN https://ghe.mycompany.net/api/v3/user | grep "X-OAuth-Scopes" |
@pengwynn They're running very new: 11.10.344 |
@nikreiman were you able to try @pengwynn's suggestions? I updated the title and description and reopening this issue. |
hub fork
fails when GHE returns 404
@pengwynn Sorry for the late response, regarding your second question, the scope should be everything. I have tried all sorts of combinations under the scopes page in application settings, including ticking all of the boxes, none of the boxes, default number of boxes, etc. Same result every time. |
@nikreiman Is this still an issue. Is it possible that you've upgraded your Enterprise instance since then? |
@mislav I'm not sure, I gave up on hub some time ago, and I also no longer work at the company with GHE. |
Closing due to stale |
When I try to fork a repo which is located on a GHE server, I get an error message "No decoder found for format (text/html; charset=utf-8)". I've built hub from source from master, and its version reports
git version 1.9.1
(repo hash is 456adff).Updates from #660 (comment): while the authentication problem was fixed in #669, GHE returns 404 for
hub fork
:The text was updated successfully, but these errors were encountered: