美文网首页Git
记一次Win10底下配置git多账号无法提交的问题

记一次Win10底下配置git多账号无法提交的问题

作者: KevinZhang1989 | 来源:发表于2019-05-31 23:47 被阅读0次

    最后更新时间

    2019-5-31 23:30

    背景

    由于进行了多个项目开发,需要提交到不同的服务器,如github,gitee等,如果用git config --global email的方式去全局配置git账号,那样就出现了一个账号不能同时在多个服务器提交代码。

    寻找解决方案1

    按照文章https://www.cnblogs.com/popfisher/p/5731232.html配置完所有的步骤

    方案1出现的问题

    image.png

    当我用gitee的ssh链接检出代码没问题,也提示我输入密码,表示我的git多账号配置是成功的,但是git commit的时候提示 *** Please tell me who you are.

    方案1出现问题后的解决方案

    为每个仓库单独设置user.name和user.email

    git config user.name "xxx"
    git config user.email "xxx@xxx.com"
    

    参考链接

    相关文章

      网友评论

        本文标题:记一次Win10底下配置git多账号无法提交的问题

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