在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Linux  數(shù)據(jù)庫/ 同一客戶端設(shè)置多個git賬戶

同一客戶端設(shè)置多個git賬戶

RT,我想在我本地設(shè)置多個git賬戶,同時應(yīng)對gitlab/github的工作。
我按照搜索的教程來做了,可以push到github遠(yuǎn)端了,雖然名字跟我設(shè)置的對的上,但是github commit log上的名字卻無法對應(yīng)上我的賬戶,也就是名字上沒有鏈接。請問是我哪里姿勢不對?

Host github.com
        HostName github.com
        User gitname
        PreferredAuthentications publickey
        IdentityFile /Users/xx/.ssh/id_rsa_github
Host gitlab.com
        HostName gitlab
        User git
        PreferredAuthentications publickey
        IdentityFile /Users/xx/.ssh/id_rsa 

我有首先unset全局設(shè)置,然后本地設(shè)置,名字跟github賬戶的名字對的上,但是push上去之后就是不能識別。順帶ssh keys也設(shè)置了。

PS:我校驗了應(yīng)該是可以連接到GitHub的。

? ssh -T git@github.com
Hi RyanLiu0235! You've successfully authenticated, but GitHub does not provide shell access.
回答
編輯回答
陌上花
2018年3月13日 08:36
編輯回答
敢試

commit log上的名字是你設(shè)置的

git config --global user.name "Your Name"
git config --global user.email "email@example.com"

可以嘗試git config --local

2017年8月19日 23:09
編輯回答
近義詞

在項目的.git文件夾所在的目錄下執(zhí)行以下命令:

git config user.name xxxxxx
git config user.email xxxxx@xxx.xxx

然后通過 git config --list 查看配置生效了沒有。
這樣你commit到github上的帳戶就是你剛才添加的。

2017年6月13日 23:37