Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/111.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Can';我没有提交或推送到github,我没有';无法启用双因素身份验证_Linux_Git_Github - Fatal编程技术网

Linux Can';我没有提交或推送到github,我没有';无法启用双因素身份验证

Linux Can';我没有提交或推送到github,我没有';无法启用双因素身份验证,linux,git,github,Linux,Git,Github,我得到了“无效用户名或密码”的错误 此外,我收到的消息是,我的身份验证失败 试图推动: error: src refspec master does not match any. error: failed to push some refs to 'https://github.com/theseareprojects/testproject.git' 验证远程: origin https://github.com/theseareprojects/testproject.git (fet

我得到了“无效用户名或密码”的错误

此外,我收到的消息是,我的身份验证失败

试图推动:

error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/theseareprojects/testproject.git'
验证远程:

origin  https://github.com/theseareprojects/testproject.git (fetch)
origin  https://github.com/theseareprojects/testproject.git (push)
验证自己的信息:

user.email=theseareprojects@protonmail.com
user.name=theseareprojects
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/theseareprojects/testproject.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
我的信息是正确的


哈哈,这有点傻,谢谢你的帮助。我甚至没有启用双因素身份验证。这让我困惑了很长一段时间。

我想你错过了一个承诺。试着一步一步地去做

git add .
git commit -m "initial project commit"
git push origin master
但是,如果已经提交,您也可以尝试以下作为本地引用独立的解决方案。这表示您希望将本地
磁头
ref推送到远程
主机
ref

git push origin HEAD:master

您粘贴的错误消息根本没有说明任何有关身份验证的信息。它抱怨您试图推送一个名为
master
的分支,但您没有。您在命令行上吗?在什么阶段会出现身份验证错误?