fatal: Authentication failed for 'https://github.com/whitesunflower/gittry.git/'

今天在git push(http协议)到github远端库时发现报以下错误:
在这里插入图片描述
后来才发现是自己配置时设置的用户名和邮箱与github并不一致。
fatal: Authentication failed for 'https://github.com/whitesunflower/gittry.git/'_第1张图片
所以通过以下语句重新设置:

git config --global user.name whitesunflower
git config --global user.email [email protected]

可以通过以下命令查看自己的配置:

git config --list

fatal: Authentication failed for 'https://github.com/whitesunflower/gittry.git/'_第2张图片
保持一致这样就可以了。

你可能感兴趣的:(Git)