Skip to content

Commit 61275c6

Browse files
authored
Update README.rst
Add flags and example for fine-grained tokens
1 parent 60cb484 commit 61275c6

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

README.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Usage
2929

3030
CLI Usage is as follows::
3131

32-
github-backup [-h] [-u USERNAME] [-p PASSWORD] [-t TOKEN] [--as-app]
32+
github-backup [-h] [-u USERNAME] [-p PASSWORD]
33+
[-t TOKEN_CLASSIC] [-f TOKEN_FINE] [--as-app]
3334
[-o OUTPUT_DIRECTORY] [-i] [--starred] [--all-starred]
3435
[--watched] [--followers] [--following] [--all]
3536
[--issues] [--issue-comments] [--issue-events] [--pulls]
@@ -57,7 +58,9 @@ CLI Usage is as follows::
5758
-p PASSWORD, --password PASSWORD
5859
password for basic auth. If a username is given but
5960
not a password, the password will be prompted for.
60-
-t TOKEN, --token TOKEN
61+
-f TOKEN_FINE, --token-fine TOKEN
62+
fine-grained personal access token
63+
-t TOKEN_CLASSIC, --token-classic TOKEN
6164
personal access, OAuth, or JSON Web token, or path to
6265
token (file://...)
6366
--as-app authenticate as github app instead of as a user.
@@ -160,13 +163,13 @@ Backup all repositories, including private ones::
160163
export ACCESS_TOKEN=SOME-GITHUB-TOKEN
161164
github-backup WhiteHouse --token $ACCESS_TOKEN --organization --output-directory /tmp/white-house --repositories --private
162165

163-
Backup a single organization repository with everything else (wiki, pull requests, comments, issues etc)::
166+
Use a fine-grained access token to backup a single organization repository with everything else (wiki, pull requests, comments, issues etc)::
164167

165168
export ACCESS_TOKEN=SOME-GITHUB-TOKEN
166169
ORGANIZATION=docker
167170
REPO=cli
168171
# e.g. git@github.com:docker/cli.git
169-
github-backup $ORGANIZATION -P -t $ACCESS_TOKEN -o . --all -O -R $REPO
172+
github-backup $ORGANIZATION -P -f $ACCESS_TOKEN -o . --all -O -R $REPO
170173

171174
Testing
172175
=======

0 commit comments

Comments
 (0)