Git Bash 无法添加我的 user.name 或 user.email



我是github/git bash的新用户。

我正在尝试使用 git bash 将我的项目添加到 github。一旦我进入git push阶段,就会出现"github.com"的用户名,但我无法输入我的用户名。这是为什么呢?

我也通过使用git config --global user.name "Your Name Here"尝试了这个

您需要删除并重新添加 github remote 作为 ssh 网址,而不是 https 网址。所以,假设你一直在推动"原点",而你的"起源"是"https://github.com/username/repo/repo.git"。您需要执行以下操作:

git remote remove origin
git remote add origin git@github.com:username/repository.git
git push origin branch

否则,您将不得不在每个会话中输入您的 github 电子邮件地址和密码。

相关内容

最新更新