1
0
This commit is contained in:
Michael Wyraz 2018-07-04 09:37:40 +02:00
parent a31779370c
commit 7410d39149

View File

@ -35,7 +35,10 @@ input('Hit any key to continue!')
gogs_url = args.target_repo + "/api/v1" gogs_url = args.target_repo + "/api/v1"
gitlab_url = args.source_repo + '/api/v4' gitlab_url = args.source_repo + '/api/v4'
gogs_token = input(("\n\nPlease provide the gogs access token which we use to access \n" if 'gogs_token' in os.environ:
gogs_token=os.environ['gogs_token']
else:
gogs_token = input(("\n\nPlease provide the gogs access token which we use to access \n"
"your account. This is NOT your password! Go to \n" "your account. This is NOT your password! Go to \n"
"/user/settings/applications\n" "/user/settings/applications\n"
"and click on 'Create new token', and copy and paste the \n" "and click on 'Create new token', and copy and paste the \n"
@ -43,8 +46,10 @@ gogs_token = input(("\n\nPlease provide the gogs access token which we use to ac
"like 3240823dfsaefwio328923490832a.\n\ngogs_token=").format(args.target_repo)) "like 3240823dfsaefwio328923490832a.\n\ngogs_token=").format(args.target_repo))
assert len(gogs_token)>0, 'The gogs token cannot be empty!' assert len(gogs_token)>0, 'The gogs token cannot be empty!'
if 'gitlab_token' in os.environ:
gitlab_token = input(("\n\nToken to access your GITLAB account. This is NOT your password! Got to \n" gitlab_token=os.environ['gitlab_token']
else:
gitlab_token = input(("\n\nToken to access your GITLAB account. This is NOT your password! Got to \n"
"{}/profile/account \n" "{}/profile/account \n"
"and copy the value in section 'Private token'. It should \n" "and copy the value in section 'Private token'. It should \n"
"look like du8dfsJlfEWFJAFhs\n" "look like du8dfsJlfEWFJAFhs\n"