gpt4 book ai didi

使用 SSH 的 Git 提交请求电子邮件

转载 作者:行者123 更新时间:2023-12-02 14:17:43 25 4
gpt4 key购买 nike

我正在尝试提交到我的 github 存储库,但我不断收到一条错误消息,要求我通过电子邮件和姓名登录来证明自己的身份。我使用 ssh 进行提交,我的 sshconfig 和 key 配置正确。我还检查了 gitconfig 文件,它们似乎也是正确的。有什么想法吗?

###Gitconfig file
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = git@github.com:imran1005/testhomere.git
fetch = +refs/heads/*:ref
[branch "master"]
remote = origin
merge = refs/heads/master

###Error msg on console win7 cmd while executing git commit:

*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'TestUser@Asus.(none)')

最佳答案

如错误消息所述,您需要设置 user.emailuser.name git 配置。此信息存储在提交中,没有它们 git 将无法工作。

my sshconfig and keys are correctly configured



这无关紧要,当您将现有提交推送到某个远程时使用 ssh key ,而不是在创建新提交时使用。

关于使用 SSH 的 Git 提交请求电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54805064/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com