github-cli icon indicating copy to clipboard operation
github-cli copied to clipboard

Add support for GitHub Enterprise

Open msabramo opened this issue 11 years ago • 2 comments

To use it, set the GH_CLI_URL environment variable -- e.g.:

export GH_CLI_URL='https://github.mycompany.com'

This allows me to use gh with our GitHub Enterprise server -- e.g.:

$ gh -r devmonkeys/smstack issue.ls | head -n 2
#257  Add gui - @sontek
#254  Make it fast - @georges

Even after adding the URL, it was a pain to switch back and forth between GitHub Enterprise and public GitHub, because there is only one ~/.githubconfig file with one [github] section to store the token. Thus in ee9b551, I added the ability to store tokens for multiple servers -- e.g.:

[github]
token = 65f6...

[github:github.mycompany.com]
token = 16a3...

Note: This PR depends on https://github.com/sigmavirus24/github3.py/pull/301; it won't work without that.

msabramo avatar Nov 05 '14 18:11 msabramo

Travis CI failed because of issue #15, which is fixed by #17.

msabramo avatar Nov 05 '14 18:11 msabramo

In ee9b551, I added the ability to store tokens for multiple servers -- e.g.:

[github]
token = 65f6...

[github:github.mycompany.com]
token = 16a3...

msabramo avatar Nov 05 '14 19:11 msabramo