configure.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:artman 作者: googleapis 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号