Skip to content

Commit

Permalink
update docs to reflect there is no more git config github.user/token
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Apr 17, 2012
1 parent 2fea5b3 commit d44e24c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 111 deletions.
21 changes: 3 additions & 18 deletions README.md
Expand Up @@ -302,24 +302,10 @@ superpowers:
Configuration
-------------

### GitHub username & token
### GitHub OAuth authentication

To get the most out of hub, you'll want to ensure your GitHub login
is stored locally in your Git config or environment variables.

To test it run this:

$ git config --global github.user

If you see nothing, you need to set the config setting:

$ git config --global github.user YOUR_USER

For commands that require write access to GitHub (such as `fork`), you'll want to
setup "github.token" as well. See [GitHub config guide][2] for more information.

If present, environment variables `GITHUB_USER` and `GITHUB_TOKEN` override the
values of "github.user" and "github.token".
Hub will prompt for GitHub username & password the first time it needs to access
the API and exchange it for an OAuth token, which it saves in "~/.config/hub".

### HTTPS insted of git protocol

Expand Down Expand Up @@ -381,5 +367,4 @@ GitHub simpler:


[speed]: http://gist.github.com/284823
[2]: http://help.github.com/set-your-user-name-email-and-github-token/
[gc]: https://twitter.com/brynary/status/49560668994674688
50 changes: 3 additions & 47 deletions man/hub.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "HUB" "1" "March 2012" "DEFUNKT" "Git Manual"
.TH "HUB" "1" "April 2012" "DEFUNKT" "Git Manual"
.
.SH "NAME"
\fBhub\fR \- git + hub = github
Expand Down Expand Up @@ -132,7 +132,7 @@ Open a GitHub compare view page in the system\'s default web browser\. \fISTART\
.
.TP
\fBgit fork\fR [\fB\-\-no\-remote\fR]
Forks the original project (referenced by "origin" remote) on GitHub and adds a new remote for it under your username\. Requires \fBgithub\.token\fR to be set (see CONFIGURATION)\.
Forks the original project (referenced by "origin" remote) on GitHub and adds a new remote for it under your username\.
.
.TP
\fBgit pull\-request\fR [\fB\-f\fR] [\fITITLE\fR|\fB\-i\fR \fIISSUE\fR|\fIISSUE\-URL\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]
Expand All @@ -145,37 +145,7 @@ If \fITITLE\fR is omitted, a text editor will open in which title and body of th
If instead of normal \fITITLE\fR an issue number is given with \fB\-i\fR, the pull request will be attached to an existing GitHub issue\. Alternatively, instead of title you can paste a full URL to an issue on GitHub\.
.
.SH "CONFIGURATION"
Use git\-config(1) to display the currently configured GitHub username:
.
.IP "" 4
.
.nf

$ git config \-\-global github\.user
.
.fi
.
.IP "" 0
.
.P
Or, set the GitHub username and token with:
.
.IP "" 4
.
.nf

$ git config \-\-global github\.user <username>
$ git config \-\-global github\.token <token>
.
.fi
.
.IP "" 0
.
.P
You can override these values with \fIGITHUB_USER\fR and \fIGITHUB_TOKEN\fR environment variables\.
.
.P
See \fIhttp://help\.github\.com/set\-your\-user\-name\-email\-and\-github\-token/\fR for more information\.
Hub will prompt for GitHub username & password the first time it needs to access the API and exchange it for an OAuth token, which it saves in "~/\.config/hub"\.
.
.P
If you prefer the HTTPS protocol for GitHub repositories, you can set "hub\.protocol" to "https"\. This will affect \fBclone\fR, \fBfork\fR, \fBremote add\fR and other operations that expand references to GitHub repositories as full URLs that otherwise use git and ssh protocols\.
Expand Down Expand Up @@ -204,20 +174,6 @@ $ git config \-\-global \-\-add hub\.host my\.git\.org
.IP "" 0
.
.P
API username and token need also be configured for each Enterprise host:
.
.IP "" 4
.
.nf

$ git config \-\-global github\."my\.git\.org"\.user <username>
$ git config \-\-global github\."my\.git\.org"\.token <token>
.
.fi
.
.IP "" 0
.
.P
The default host for commands like \fBinit\fR and \fBclone\fR is still github\.com, but this can be affected with the \fIGITHUB_HOST\fR environment variable:
.
.IP "" 4
Expand Down
29 changes: 4 additions & 25 deletions man/hub.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 3 additions & 21 deletions man/hub.1.ronn
Expand Up @@ -128,8 +128,7 @@ hub also adds some custom commands that are otherwise not present in git:

* `git fork` [`--no-remote`]:
Forks the original project (referenced by "origin" remote) on GitHub and
adds a new remote for it under your username. Requires `github.token` to
be set (see CONFIGURATION).
adds a new remote for it under your username.

* `git pull-request` [`-f`] [<TITLE>|`-i` <ISSUE>|<ISSUE-URL>] [`-b` <BASE>] [`-h` <HEAD>]:
Opens a pull request on GitHub for the project that the "origin" remote
Expand All @@ -149,20 +148,8 @@ hub also adds some custom commands that are otherwise not present in git:

## CONFIGURATION

Use git-config(1) to display the currently configured GitHub username:

$ git config --global github.user

Or, set the GitHub username and token with:

$ git config --global github.user <username>
$ git config --global github.token <token>

You can override these values with <GITHUB_USER> and <GITHUB_TOKEN>
environment variables.

See <http://help.github.com/set-your-user-name-email-and-github-token/> for more
information.
Hub will prompt for GitHub username & password the first time it needs to access
the API and exchange it for an OAuth token, which it saves in "~/.config/hub".

If you prefer the HTTPS protocol for GitHub repositories, you can set
"hub.protocol" to "https". This will affect `clone`, `fork`, `remote add`
Expand All @@ -179,11 +166,6 @@ configure hub to treat such remotes same as github.com:

$ git config --global --add hub.host my.git.org

API username and token need also be configured for each Enterprise host:

$ git config --global github."my.git.org".user <username>
$ git config --global github."my.git.org".token <token>

The default host for commands like `init` and `clone` is still
github.com, but this can be affected with the <GITHUB_HOST> environment
variable:
Expand Down

0 comments on commit d44e24c

Please sign in to comment.