-
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
Use hub pull-request with SSH #978
Comments
You can't auth to the API over an ssh key, but you can get a oauth token and put that into hub manually. |
Hub accesses GitHub API via HTTPS, so it needs some kind of authentication such as Basic Auth or OAuth. SSH keys won't help because they're only used by git when pushing/pulling. Because you don't have a password you can authenticate with, only 2FA token, that means you will probably need to generate a Personal access token manually. You can do that from your settings in the web interface. Then, add that token to ---
myenterprise.com:
- protocol: https
user: tybenz
oauth_token: YOURTOKEN |
This is a very old Issue thread with incredible search engine placement. I searched just for "hub ssh," ended up here, tried this and it didn't work. Looking at the docs here it seems the proper way to do this nowadays is to simply set an environment variable with the name |
whoa @rayrrr what are you doing here |
I have two-factor authentication enabled.
|
|
Can this get added to the docs or README? |
It also checks for an env variable called GITHUB_TOKEN which was surprising for me since all of the docs pointed to deleting the config value -- just incase anyone else gets stuck on this like I do. |
The documentations on https://hub.github.com/hub.1.html seems to still indicate that git is the default In the short term, using the full |
Can we get some more explicit documentation? Specifically on these topics
|
Until there is better documentation:
Yes, because hub needs access to the GitHub API, which can only be accessed via HTTP(S) Oauth2 and not SSH.
There is no difference. Use the one you're more comforable with.
It's required in case |
Reopening until there are better docs. More about the SSH vs. HTTPS communication during hub operations: #1644 (comment) |
In my
and inside
If I try to do |
I added also
to my |
Finally this worked for me....
I am sure that there is some minimal version of this config that I could just keep , but there seems to be biggest confusion caused by I believe that The second part of the auth is |
I'm confused: When it comes to git config, why did |
For me, just the |
I am trying to use hub with GitHub Enterprise. My company's enterprise account is set up to only use SSH keys when pulling/pushing. I think they've disabled basic auth altogether. When using
hub pull-request
, hub prompts me for my username/password for GitHub Enterprise, which I do not have. Our web portal requires a username + 2FA token. Tried to use that to no avail.Is there a way for hub to use the GitHub API and use an SSH key to authenticate itself?
Or am I out of luck?
The text was updated successfully, but these errors were encountered: