mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-06 08:28:03 +01:00
Update README.rst
Add flags and example for fine-grained tokens
This commit is contained in:
11
README.rst
11
README.rst
@@ -29,7 +29,8 @@ Usage
|
|||||||
|
|
||||||
CLI Usage is as follows::
|
CLI Usage is as follows::
|
||||||
|
|
||||||
github-backup [-h] [-u USERNAME] [-p PASSWORD] [-t TOKEN] [--as-app]
|
github-backup [-h] [-u USERNAME] [-p PASSWORD]
|
||||||
|
[-t TOKEN_CLASSIC] [-f TOKEN_FINE] [--as-app]
|
||||||
[-o OUTPUT_DIRECTORY] [-i] [--starred] [--all-starred]
|
[-o OUTPUT_DIRECTORY] [-i] [--starred] [--all-starred]
|
||||||
[--watched] [--followers] [--following] [--all]
|
[--watched] [--followers] [--following] [--all]
|
||||||
[--issues] [--issue-comments] [--issue-events] [--pulls]
|
[--issues] [--issue-comments] [--issue-events] [--pulls]
|
||||||
@@ -57,7 +58,9 @@ CLI Usage is as follows::
|
|||||||
-p PASSWORD, --password PASSWORD
|
-p PASSWORD, --password PASSWORD
|
||||||
password for basic auth. If a username is given but
|
password for basic auth. If a username is given but
|
||||||
not a password, the password will be prompted for.
|
not a password, the password will be prompted for.
|
||||||
-t TOKEN, --token TOKEN
|
-f TOKEN_FINE, --token-fine TOKEN
|
||||||
|
fine-grained personal access token
|
||||||
|
-t TOKEN_CLASSIC, --token-classic TOKEN
|
||||||
personal access, OAuth, or JSON Web token, or path to
|
personal access, OAuth, or JSON Web token, or path to
|
||||||
token (file://...)
|
token (file://...)
|
||||||
--as-app authenticate as github app instead of as a user.
|
--as-app authenticate as github app instead of as a user.
|
||||||
@@ -160,13 +163,13 @@ Backup all repositories, including private ones::
|
|||||||
export ACCESS_TOKEN=SOME-GITHUB-TOKEN
|
export ACCESS_TOKEN=SOME-GITHUB-TOKEN
|
||||||
github-backup WhiteHouse --token $ACCESS_TOKEN --organization --output-directory /tmp/white-house --repositories --private
|
github-backup WhiteHouse --token $ACCESS_TOKEN --organization --output-directory /tmp/white-house --repositories --private
|
||||||
|
|
||||||
Backup a single organization repository with everything else (wiki, pull requests, comments, issues etc)::
|
Use a fine-grained access token to backup a single organization repository with everything else (wiki, pull requests, comments, issues etc)::
|
||||||
|
|
||||||
export ACCESS_TOKEN=SOME-GITHUB-TOKEN
|
export ACCESS_TOKEN=SOME-GITHUB-TOKEN
|
||||||
ORGANIZATION=docker
|
ORGANIZATION=docker
|
||||||
REPO=cli
|
REPO=cli
|
||||||
# e.g. git@github.com:docker/cli.git
|
# e.g. git@github.com:docker/cli.git
|
||||||
github-backup $ORGANIZATION -P -t $ACCESS_TOKEN -o . --all -O -R $REPO
|
github-backup $ORGANIZATION -P -f $ACCESS_TOKEN -o . --all -O -R $REPO
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
=======
|
=======
|
||||||
|
|||||||
Reference in New Issue
Block a user