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
Add a uri_scheme option #247
Conversation
I'm in the same boat: http only for our GH:Ent install. However, there seems to be a chicken and egg problem here. I can't get hub to generate the ~/.config/hub file containing an auth token in the first place. But I need that file to tell hub I want to use http instead of https. Is there a workaround? |
@gvaughn When I run something like Does it not generate the ~/.config/hub with an entry for your github enterprise url when you enter your username at the prompt? If so, maybe you didn't follow the instructions to whitelist your github enterprise?
|
This allows github enterprise installations that don't use https to use the hub gem. I think all installations should use https, but I don't control my company's install, and their argument for not using https is that the install is only available over VPN, so traffic is already encrypted, and using https means they'd need to buy another https cert. So until I can convince them otherwise, I'd still like to be able to make pull-requests from the command line.
Hey guys. The current process for adding an enterprise host is convoluted and too manual, even more so if I merge this pull request. This is evident by your current problems. I need to improve this. The code in this pull request is solid and I will work with that. However you don't need to contribute to this pull request further. I'm in the process of restructuring things a little, and will report back when done. |
@mislav I just noticed that the cucumbers were passing in master, so I was working a bit on fixing those with my PR. I realized that with my "fix" to I also noticed that one of the remaining cucumber failures says that the ~/.config/hub shouldn't be present if the authentication step fails, and that's no longer the case. I was going to work on fixing that, but I'll hold off if you're restructuring. Let me know if I can help with the restructuring or any further improvements to this branch and thanks again. |
Just got back to this. Thanks for the replies. I hadn't pulled down this PR yet and figured out how to override my brew-installed hub. It is the 1.10.12 code that won't create the ~/.config/hub if there's an auth error. So I'm not really reporting anything knew. @mislav will you follow up here with your progress or is there somewhere else I should sign up to stay in the loop? |
@gvaughn, I'm a little confused how you expect to be able to change the scheme to http from https if you haven't pulled down this PR yet. The currently released code for hub won't let you do that, but if you're running the code in this PR, then the steps I describe above should work for you until @mislav finishes restructuring, merging and releasing some form of this PR. |
@mmrobins Sorry for the confusion. I didn't have a lot of time to devote to this. I was going to quickly set up my config file, then figure out how to get your branch to mask the brew'd hub (and be easy to undo) as a second step. I now understand that ordering doesn't work. I'll try to find time to do it right this evening. |
@mmrobins I got it working. I just had to read the docs. I moved my old hub script and then ran "rake install prefix=/usr/local" from a clone of your branch. I got ~/.config/hub setup with 'http' and my initial experiments with 'hub browse' is working great. Thanks. I'll still keep an eye on @mislav 's long term solution, but this is a great step forward for the time being. |
@mislav just remembered this PR since I had a coworker ask about using hub. Any word on the restructuring of enterprise auth? I'll haven't checked the code in master in a while, but I can try to rebase or something if it would help get this in. |
I didn't yet get around to improving that. I definitely want to have an It's a tricky problem. You're welcome to take a stab. |
So it's been almost a year.. Any progress on this? |
I've just been using my branch to run hub commands, feel free to use it as well. I haven't tried to merge any of master back in or anything, but may try. I didn't really want to take a stab at and |
I can confirm that. I've been running @mmrobins branch this entire time. No complaints. However, I did have a co-worker ask me the other day how 'git browse' was working for me. When I pointed them to this thread, they declined spending the time to set it up and be off mainline hub. |
No progress. I'm sorry. I wanted to cover this while making a specialized hub subcommand that handles authentication and Enterprise configuration, but I never got around to actually writing it. I'll think about merging parts of this PR and have people edit their hub config file manually if they really want this. The PR is good stuff; I just want the diff to be smaller and I have an idea how to achieve that. |
So, I loaded up the @mmrobins fork and that gets me the basics.. But browse, compare, etc (the various webpage loading functions) still try to load an https url (and fail). How do I override that? |
@Yeraze: Did you set: uri_scheme: http in |
Ah.. got it figured out, thanks :) |
I went straight for #485 actually, but I'll do that :) |
Oops, I meant #485 actually 😄 Sorry. Mixing up PRs. |
Thanks for the feature idea. This is now possible in master via the |
This allows github enterprise installations that don't use https to use the
hub gem.
I think all installations should use https, but I don't control my company's
install, and their argument for not using https is that the install is only
available over VPN, so traffic is already encrypted, and using https means
they'd need to buy another https cert.
So until I can convince them otherwise, I'd still like to be able to make
pull-requests from the command line.
The cucumber tests don't run for me
so I haven't updated them. If I comment out that line in
features/support/env.rb there's already failures in the master branch, so it's
hard to tell if my changes could have broken anything.