Update instructions for API access

This commit is contained in:
Tim Pope
2017-05-23 15:05:37 -04:00
parent 925dec7ee7
commit 9792526427

View File

@@ -26,22 +26,17 @@ then simply copy and paste:
git clone https://github.com/tpope/vim-rhubarb.git
vim -u NONE -c "helptags vim-rhubarb/doc" -c q
In addition to [fugitive.vim][], [Curl](http://curl.haxx.se/) is
required (included with macOS).
You'll also need [fugitive.vim][].
Provide your GitHub credentials by adding them to your netrc:
[Curl](http://curl.haxx.se/) (included with macOS) is required for features
that use the GitHub API (i.e., `:Gbrowse` doesn't need it).
[Generate a personal access token](https://github.com/settings/tokens/new)
with repo permissions and add it to your `.netrc`:
echo 'machine api.github.com login <user> password <password>' >> ~/.netrc
echo 'machine api.github.com login <user> password <token>' >> ~/.netrc
If you'd rather not store your password in plain text, you can
[generate a personal access token](https://github.com/settings/tokens/new)
and use that instead:
echo 'machine api.github.com login <token> password x-oauth-basic' \
>> ~/.netrc
If you are using GitHub Enterprise, repeat those steps for each domain (omit
the `api.` portion). You'll also need to tell Rhubarb the root URLs:
If you are using GitHub Enterprise, repeat this step for each domain (omit the
`api.` portion). You'll also need to tell Rhubarb the root URLs:
let g:github_enterprise_urls = ['https://example.com']