Git提交SSH请求电子邮件

Git提交SSH请求电子邮件,git,github,ssh,cmd,gitlab,Git,Github,Ssh,Cmd,Gitlab,我正试图提交到我的github存储库,但我不断收到一条错误消息,要求我通过电子邮件和姓名登录来识别自己。我正在使用ssh进行提交,我的sshconfig和密钥配置正确。我还检查了gitconfig文件,它们似乎也是正确的。。有什么想法吗 ###Gitconfig file [core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true syml

我正试图提交到我的github存储库,但我不断收到一条错误消息,要求我通过电子邮件和姓名登录来识别自己。我正在使用ssh进行提交,我的sshconfig和密钥配置正确。我还检查了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.email
user.name
git配置。这些信息存储在commit中,没有它们git就无法工作

我的sshconfig和密钥配置正确


这与此无关,ssh密钥是在将现有提交推送到某个远程服务器时使用的,而不是在创建新提交时使用的。

git config--global user.email您得到了什么输出?我得到了一个空输出只需按照错误中的说明操作即可。除了登录到Github之外,git提交还应该告诉您是谁。因此,请用您的详细信息填写从
git-config
开始的那两行。这意味着您的凭证没有在git-config中设置。您需要为您的git配置设置电子邮件、名称和密码。我正在使用SSH,使用RSA密钥进行身份验证。我不必在使用sshThank you提交时设置电子邮件名称和密码。事实上,您是对的,即使使用SSH提交,也应该配置电子邮件!