unable to auto-detect email address (got '51779@DESKTOP-U0HRQBO.(none)')

在控制台配置git config
git config --global user.email "xxxxx@qq.com"
git config --global user.name"xxxx"
继续提交代码还是报错:
Push failed
Invocation failed Unexpected end of file from server
java.lang.RuntimeException: Invocation failed Unexpected end of file from server

android studio 勾选
file->setting->git 勾选user credential helper
继续push提交报错:
Push failed
remote: [31m[session-8a4d84b4] 619663954: Incorrect username or password (access token)[0m
Authentication failed for 'https://gitee.com/xxxxx/xxxxx.git/'

打开电脑控制面板



代码push成功:

有时报这个错误:
git@gitee.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists
打开cmd控制台执行以下命令:
ssh-keygen -t rsa -C "xxxx@xxx.com"
一直按enter键

找到上面的文件件用记事本打开复制内容,打开gitee网站,登录 找到:设置->安全设置->ssh,把复制的秘钥粘贴在输入框里,保存,提交代码ok了。
