美文网首页IOS
Git Push 避免用户名和密码方法

Git Push 避免用户名和密码方法

作者: 大明白 | 来源:发表于2016-10-08 14:18 被阅读41次

    1. 创建文件存储GIT用户名和密码
    home目录中,添加.git-credentials:

    cd ~
    vim .git-credentials
        https://{username}:{password}@github.com
    

    2. 添加Git Config 内容
    输入如下命令:

    git config --global credential.helper store
    

    执行完后查看.gitconfig文件,会多了一项:

    [credential] 
        helper = store
    

    git push时就不用再输入用户名和密码

    相关文章

      网友评论

        本文标题:Git Push 避免用户名和密码方法

        本文链接:https://www.haomeiwen.com/subject/pxmuyttx.html