From 2410429e030d91c7321d22b75085db6b9e570e2a Mon Sep 17 00:00:00 2001 From: Dmitry Afanasyev Date: Wed, 9 Mar 2022 16:42:55 +0300 Subject: [PATCH] sercret token must be at each --- README.md | 8 ++++---- core/argument_parser.py | 10 +++++----- github_mirror.py | 3 ++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9b4abb7..2d8abf3 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,12 @@ python3 github_mirror.py [-h] [-g GROUP] (-u URLS [URLS ...] | -f FILE) -t TOKEN ## Examples: - python3 github_mirror -u "https://github.com/s3rius/FastAPI-template.git" -g 2059 + python3 github_mirror -u "https://github.com/s3rius/FastAPI-template.git" -g 2059 -t "git-QwertY1245kde" - python3 github_mirror -u "https://github.com/s3rius/FastAPI-template.git" "https://github.com/sqlalchemy/sqlalchemy.git" + python3 github_mirror -u "https://github.com/s3rius/FastAPI-template.git" "https://github.com/sqlalchemy/sqlalchemy.git" -t "git-QwertY1245kde" - python3 github_mirror -f github_mirrors.txt -g 59563 + python3 github_mirror -f github_mirrors.txt -g 59563 -t "git-QwertY1245kde" - python3 github_mirror -f github_mirrors.txt -u "https://github.com/s3rius/FastAPI-template.git" + python3 github_mirror -f github_mirrors.txt -u "https://github.com/s3rius/FastAPI-template.git" -t "git-QwertY1245kde" python3 github_mirror.py --gitlab "https://gitlab.company.ru" -t "git-QwertY1245kde" -g 2059 -u "https://github.com/s3rius/FastAPI-template.git" \ No newline at end of file diff --git a/core/argument_parser.py b/core/argument_parser.py index d85821b..27c5253 100644 --- a/core/argument_parser.py +++ b/core/argument_parser.py @@ -5,15 +5,15 @@ GITLAB_URL = 'https://git.do.x5.ru' USAGE = '''github_mirror [-h] [-g GROUP] (-u URLS [URLS ...] | -f FILE) -t TOKEN -------------------------------------------------- -python3 github_mirror -u "https://github.com/s3rius/FastAPI-template.git" -g 2059 +python3 github_mirror -u "https://github.com/s3rius/FastAPI-template.git" -g 2059 -t "git-QwertY1245kde" -python3 github_mirror -u "https://github.com/s3rius/FastAPI-template.git" "https://github.com/sqlalchemy/sqlalchemy.git" +python3 github_mirror -u "https://github.com/s3rius/FastAPI-template.git" "https://github.com/sqlalchemy/sqlalchemy.git" -t "git-QwertY1245kde" -python3 github_mirror -f github_mirrors.txt -g 59563 +python3 github_mirror -f github_mirrors.txt -g 59563 -t "git-QwertY1245kde" -python3 github_mirror -f github_mirrors.txt -u "https://github.com/s3rius/FastAPI-template.git" +python3 github_mirror -f github_mirrors.txt -u "https://github.com/s3rius/FastAPI-template.git" -t "git-QwertY1245kde" -python3 gitlab_mirror.py --gitlab "https://gitlab.company.ru" -t "git-QwertY1245kde" -g 2059 +python3 github_mirror.py --gitlab "https://gitlab.company.ru" -t "git-QwertY1245kde" -g 2059 -------------------------------------------------- diff --git a/github_mirror.py b/github_mirror.py index 9219424..9d02d17 100644 --- a/github_mirror.py +++ b/github_mirror.py @@ -43,9 +43,10 @@ def main(): threads_ready_statistic(threads) # add threads ready status to log output else: - logger.info('You must provide urls to mirror') + logger.info('You must provide at least one github url for mirror') sys.exit(1) if __name__ == '__main__': main() +