def _configure_github(github):
"""Determine and return the GitHub configuration.
Args:
github (dict): The current GitHub configuration.
Returns:
dict: The new GitHub configuration.
"""
answer = copy(github)
logger.info('Since you intend to publish to GitHub, you need to '
'supply credentials.')
logger.info('Create an access token at: '
'https://github.com/settings/tokens')
logger.info('It needs the "repo" scope and nothing else.')
while not answer.get('username'):
answer['username'] = six.moves.input('GitHub username: ')
while not answer.get('token'):
answer['token'] = getpass.getpass('GitHub token (input is hidden): ')
return answer
评论列表
文章目录