We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 03604cc + 97e4fbb commit 77ede50Copy full SHA for 77ede50
1 file changed
bin/github-backup
@@ -141,7 +141,7 @@ def parse_args():
141
parser.add_argument('-t',
142
'--token',
143
dest='token',
144
- help='personal access or OAuth token')
+ help='personal access or OAuth token, or path to token (file://...)')
145
parser.add_argument('-o',
146
'--output-directory',
147
default='.',
@@ -255,6 +255,10 @@ def get_auth(args, encode=True):
255
auth = None
256
257
if args.token:
258
+ _path_specifier = 'file://'
259
+ if args.token.startswith(_path_specifier):
260
+ args.token = open(args.token[len(_path_specifier):],
261
+ 'rt').readline().strip()
262
auth = args.token + ':' + 'x-oauth-basic'
263
elif args.username:
264
if not args.password:
0 commit comments