我在Ubuntu 14.04上无法使用git提交代码
错误信息如下:
git: 致命错误:无法自动检测电子邮件地址(获取到“一些错误的电子邮件地址”)
我尝试使用git-config
命令设置了user.name和user.mail选项,包括使用--global
参数和不使用,但都没有起作用。
我在Ubuntu 14.04上无法使用git提交代码
错误信息如下:
git: 致命错误:无法自动检测电子邮件地址(获取到“一些错误的电子邮件地址”)
我尝试使用git-config
命令设置了user.name和user.mail选项,包括使用--global
参数和不使用,但都没有起作用。
很可能是一个笔误:将user.mail
设为无e。通过在全局配置中设置user.email
来修复它。
$ git config --global user.email "you@example.com"
已经有人问过了:为什么在配置后 Git 仍然不允许我提交?
为确定起见,请运行:
$ git config --local -l
uers.email
:)
你可以使用 git config -l
命令来查看那些不友好的配置项。 - Edgar Manukyan确保在设置用户名和电子邮件地址时,您应该在主目录而不是本地目录中。
git config --global user.email "you@example.com"
git config --global user.name "github_username"
然后遵循 GitHub 上的步骤。
如果 git config --global user.email "you@domain.com"
git config --global user.name "github_username"
不起作用,你可以尝试使用以下命令:
git config --replace-all user.email "you@domain.com"
git config --replace-all user.name "github_username"
致命错误:无法自动检测电子邮件地址(获取的是'jsiddharth@TheDEN.(none)')
我运行了以下命令:
git config --global user.email "myemailid@example.com"
git config --global user.name "my name"
repo init -u https://example.com/platform/manifest
运行git stash
时,我遇到了这个错误。用以下方法解决:
git config --global user.email {emailaddress}
git config --global user.name {name}
我昨天遇到了这个问题。在我的解决方案中,先检查以下设置。
git config --global user.email "your_address_email@example.com"
git config --global user.name "your_name"
"user"代表笔记本电脑的用户。
例如:dias@dias-hp-pavilion$ git config --global dias.email ...
因此,请确认添加的信息,执行以下操作:
dias@dias-hp-pavilion:/home/dias$ git config --global dias.email
my_address_email@example.com
dias@dias-hp-pavilion:/home/dias$ git config --global dias.name
my_name
或者
nano /home/user_name/.gitconfig
请检查这些信息。
如果您已尝试并仍然存在错误,请尝试其他 Git IDE(GUI 客户端)。我曾使用 git-cola,但出现了此错误,因此我更换了 IDE,并且目前我使用 CollabNet GitEye。
在我使用sudo运行这些命令后,问题得到了解决。
我遇到了类似的问题,虽然我还是个新手,但我需要先进入上级目录,设置用户名,然后再返回到git仓库所在的目录。
cd ..
git config --global user.email "your_address_email@domain.com"
git config --global user.name "your_name"
cd <your repository folder>
git config --global user.email "your_address_email@domain.com"