git.py 文件源码

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

项目:aetros-cli 作者: aetros 项目源码 文件源码
def prepare_git_user(self):
        """
        Tries to read the git name and email, so all git commits have correct author.
        Requests /api/user-git to check which user is behind the current configured ssh key.
        """
        import aetros.api
        try:
            response = aetros.api.request('user-git')
            if response:
                user = yaml.safe_load(response)

                self.git_name = user['name']
                self.git_email = user['email']
            else:
                self.go_offline()
        except ApiConnectionError as e:
            self.go_offline()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号