鉴于我的电子邮件和用户名包含在〜/的.gitconfig:“混帐配置-l”显示我的用户名/电子邮件设置,但混帐推询问用户名
$cat ~/.gitconfig
[user]
name = MyFirst MyLast
email = [email protected]
而且git config -l
“看到”他们:
$git config -l
user.name=MyFirst MyLast
[email protected]
为什么git push
不是看到他们?
$git push origin master
Username for 'https://github.com':
这里有点更多的信息:
状态:
git status
On branch master
Your branch is based on 'origin/master', but the upstream is gone.
(use "git branch --unset-upstream" to fixup)
Untracked files:
(use "git add <file>..." to include in what will be committed)
遥控器:
git remote -v
origin https://github.com/<owner>/<repo> (fetch)
origin https://github.com/<owner>/<repo> (push)
Git并不认为'〜/ .gitconfig'中的您的名字与您的github用户名相同。 git软件与github网站是分开的。我建议将SSH密钥添加到您的github帐户,以便您不必在每次推送时输入用户名/密码。 – Adrian