Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

man docs for Enterprise configuration

  • Loading branch information...
commit 48e774d2047d06ef21781d71469c9d41fc4bce40 1 parent a579aef
@mislav mislav authored
Showing with 83 additions and 2 deletions.
  1. +41 −1 man/hub.1
  2. +23 −1 man/hub.1.html
  3. +19 −0 man/hub.1.ronn
View
42 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" "November 2011" "DEFUNKT" "Git Manual"
+.TH "HUB" "1" "January 2012" "DEFUNKT" "Git Manual"
.
.SH "NAME"
\fBhub\fR \- git + hub = github
@@ -193,6 +193,46 @@ $ git config \-\-global hub\.protocol https
.
.IP "" 0
.
+.SS "GitHub Enterprise"
+By default, hub will only work with repositories that have remotes which point to github\.com\. GitHub Enterprise hosts need to be whitelisted to configure hub to treat such remotes same as github\.com:
+.
+.IP "" 4
+.
+.nf
+
+$ git config \-\-global \-\-add hub\.host my\.git\.org
+.
+.fi
+.
+.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
+.
+.nf
+
+$ GITHUB_HOST=my\.git\.org git clone myproject
+.
+.fi
+.
+.IP "" 0
+.
.SH "EXAMPLES"
.
.SS "git clone"
View
24 man/hub.1.html
@@ -221,6 +221,28 @@ <h2 id="CONFIGURATION">CONFIGURATION</h2>
<pre><code>$ git config --global hub.protocol https
</code></pre>
+<h3 id="GitHub-Enterprise">GitHub Enterprise</h3>
+
+<p>By default, hub will only work with repositories that have remotes which
+point to github.com. GitHub Enterprise hosts need to be whitelisted to
+configure hub to treat such remotes same as github.com:</p>
+
+<pre><code>$ git config --global --add hub.host my.git.org
+</code></pre>
+
+<p>API username and token need also be configured for each Enterprise host:</p>
+
+<pre><code>$ git config --global github."my.git.org".user &lt;username>
+$ git config --global github."my.git.org".token &lt;token>
+</code></pre>
+
+<p>The default host for commands like <code>init</code> and <code>clone</code> is still
+github.com, but this can be affected with the <var>GITHUB_HOST</var> environment
+variable:</p>
+
+<pre><code>$ GITHUB_HOST=my.git.org git clone myproject
+</code></pre>
+
<h2 id="EXAMPLES">EXAMPLES</h2>
<h3 id="git-clone">git clone</h3>
@@ -428,7 +450,7 @@ <h2 id="SEE-ALSO">SEE ALSO</h2>
<ol class='man-decor man-foot man foot'>
<li class='tl'>DEFUNKT</li>
- <li class='tc'>November 2011</li>
+ <li class='tc'>January 2012</li>
<li class='tr'>hub(1)</li>
</ol>
View
19 man/hub.1.ronn
@@ -173,6 +173,25 @@ URLs that otherwise use git and ssh protocols.
$ git config --global hub.protocol https
+### GitHub Enterprise
+
+By default, hub will only work with repositories that have remotes which
+point to github.com. GitHub Enterprise hosts need to be whitelisted to
+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:
+
+ $ GITHUB_HOST=my.git.org git clone myproject
+
## EXAMPLES
{{README}}
Please sign in to comment.
Something went wrong with that request. Please try again.