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 git clone https://github.com/tpope/vim-rhubarb.git
vim -u NONE -c "helptags vim-rhubarb/doc" -c q vim -u NONE -c "helptags vim-rhubarb/doc" -c q
In addition to [fugitive.vim][], [Curl](http://curl.haxx.se/) is You'll also need [fugitive.vim][].
required (included with macOS).
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 If you are using GitHub Enterprise, repeat this step for each domain (omit the
[generate a personal access token](https://github.com/settings/tokens/new) `api.` portion). You'll also need to tell Rhubarb the root URLs:
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:
let g:github_enterprise_urls = ['https://example.com'] let g:github_enterprise_urls = ['https://example.com']