Skip to content
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

How do I build GH on Windows? or is there a windows prebuilt for 2.1.0? #231

Closed
fcassirer opened this issue Oct 28, 2014 · 9 comments
Closed

Comments

@fcassirer
Copy link

I'd like to build GH on Windows, is there a how-to? There doesn't appear to be a 2.1.0 version prebuilt in the release downloads here.

Thanks!
-Fred Cassirer

@owenthereal
Copy link
Owner

Unfortunately there's no prebuilt Windows binary for 2.1.0. But you could build it by checking out the project and run ./script/build. You'd need a Go development environment to get this working. Also note that moving forward gh will be merged with hub.

@fcassirer
Copy link
Author

Thanks for the quick response. We're running into issues with the 2.0.0 with the gh fork --no-remote command. I believe this might be addressed in the later release.

We are also seeing issues depending on what shell is used. What environment are you running/testing the gh command for Windows in? Cygwin? Git-Bash? Using it in cmdshell just returns on most sub-commands.

Thanks

@owenthereal
Copy link
Owner

What environment are you running/testing the gh command for Windows in? Cygwin? Git-Bash?

I did that in Cygwin since the build script is written in bash. I believe you could use Git-Bash as well.

@fcassirer
Copy link
Author

Great, thanks again. Did you ever have I/O problems when reading the passwords for an https:// url? commands like 'gh remote add -f origin' prompt but do not properly read from stdin. Git-Bash works here, but seems to fail with:
2014/10/28 10:53:55 fatal: No decoder found for format (text/html; charset=utf-8)

@owenthereal
Copy link
Owner

Did you ever have I/O problems when reading the passwords for an https:// url? commands like 'gh remote add -f origin' prompt but do not properly read from stdin.

Were you able to insert your password when it prompts?

but seems to fail with: 2014/10/28 10:53:55 fatal: No decoder found for format (text/html; charset=utf-8)

This doesn't seem to be a password issue though. It's the decoder couldn't recognize the media type header "text/html". What commands did you run?

@fcassirer
Copy link
Author

The password doesn't get read, any text entered is buffered up and read by the shell after the command is aborted. I know there are some issues with how cygwin reads from stdin, for example, the ruby or python debuggers input streams often don't work right under cygwin.

So there are two separate problems, the password issue is under the cygwin shell and the text/html decoder issue is under Git-Bash. The command(s) (more or less) are:
$ gh clone --origin upstream https://our-github-enterprise-server/xyz/repo
$ cd repo
$ gh fork --no-remote
2014/10/28 13:51:21 fatal: Aborted: the origin remote doesn't point to a GitHub repository.
$ gh remote -v
origin
upstream https://our-github-enterprise-server/xyz/repo (fetch)
upstream https://our-github-enterprise-server/xyz/repo (push)
$ gh remote add -f origin
github.com username: fcassirer
our-github-enterprise-server.com password for fcassirer (never stored): **********
2014/10/28 13:57:40 fatal: No decoder found for format (text/html; charset=utf-8)
$ echo $GITHUB_HOST
our-github-enterprise-server.com

Doing the same thing on cygwin doesn't get past the password prompt

Thanks for looking
-FredC

@fcassirer
Copy link
Author

It appears the "No decoder found" message was the result of a redirect happening for our github enterprise server. I was able to successfully build the latest 'hub' command on Windows using 'go', but that still has the same issue around password entry on cygwin.

@fcassirer
Copy link
Author

Our GitHub Enterpise instance only uses https for the REST api. I have been trying to get the hub fork command to work and it appears that it is not using the https_proxy or .gitconfig equivalent. Am I reading the hub go code correctly in that it seems only http_proxy and http:// is supported? (http.go vs https.go)

@owenthereal
Copy link
Owner

Please try out a 2.2.0 release from https://github.com/github/hub/releases/tag/v2.2.0-rc1. gh will be known as GitHub CLI and has been merged to hub. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants