Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.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
推送到Github(HTTP/SSH)的问题_Git_Github_Ssh_Git Push - Fatal编程技术网

推送到Github(HTTP/SSH)的问题

推送到Github(HTTP/SSH)的问题,git,github,ssh,git-push,Git,Github,Ssh,Git Push,我有两个不同的问题,解决其中任何一个都会对我有很大帮助。我正试图推动我对git回购协议所做的一些修改,但我似乎两次都没能成功 我尝试的第一种方法是使用我到目前为止一直在使用的命令: git push 但是,在提交过程中,大约30%的时间会被挂起。在网上找到一些帖子后,我确信这是HTTP连接的问题。我尝试使用: git push --verbose --progress git config http.postBuffer 524288000 git push -v ssh://my-acc

我有两个不同的问题,解决其中任何一个都会对我有很大帮助。我正试图推动我对git回购协议所做的一些修改,但我似乎两次都没能成功

我尝试的第一种方法是使用我到目前为止一直在使用的命令:

git push
但是,在提交过程中,大约30%的时间会被挂起。在网上找到一些帖子后,我确信这是HTTP连接的问题。我尝试使用:

git push --verbose --progress
git config http.postBuffer 524288000
git push -v ssh://my-account@github.com/my-repo.git
而且它总是被困在

Pushing to https://github.com/my-account/my-repo.git
Counting objects: 87, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (66/66), done.
POST git-receive-pack (chunked)476.45 MiB | 29.64 MiB/s  
我没有任何大文件,所以我不确定是什么问题。 查看了一些StackOverflow页面后,我尝试使用:

git push --verbose --progress
git config http.postBuffer 524288000
git push -v ssh://my-account@github.com/my-repo.git
这(我认为)应该阻止它将数据分块到缓冲区,并允许更大的文件通过,但我没有得到任何改变。 然后我尝试更新我的git版本(当时是2.10.0,现在是2.13.1),但这并没有改变任何事情

有人建议使用SSH,但我似乎无法使我的SSH密钥正常工作。我尝试使用:

git push --verbose --progress
git config http.postBuffer 524288000
git push -v ssh://my-account@github.com/my-repo.git
但我总是犯错误:

Pushing to ssh://my-account@github.com/my-repo.git
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
所以我尽了很大的努力来让它工作,甚至重新生成我的密钥,并在我的帐户中重新注册,确保编辑配置以确保一切正常。它被证实了;命令

ssh -T git@github.com
返回

Hi my-account! You've successfully authenticated, but GitHub does not provide shell access.
但是,当然

git push -v ssh://my-account@github.com/my-repo.git


返回与以前相同的错误,权限被拒绝。关于如何解决SSH验证问题或HTTP缓冲问题,您有什么想法吗?

Github使用单个用户进行
SSH
,并且用户名是路径的一部分,例如
git@github.com:my account/repo.git

Github正在为
ssh
使用单个用户,并且用户的名称是路径的一部分,例如
git@github.com:my account/repo.git

通常(公钥)表示您没有向github帐户或相应的repo添加RSA私钥。这个回购协议是私人的吗?是的,回购协议是私人的。我已经将我的密钥添加到我的github帐户,除非我做得不对。它将我的id_rsa指纹存储在SSH密钥下。通常情况下,您会推送到分支名称。你试过指定一个分支吗?只是试过,没有改变。你从哪里得到那个URL的?Github URL看起来像这样:
git@github.com:my account/repo.git
通常(公钥)表示您尚未将RSA私钥添加到github帐户或相应的repo。这个回购协议是私人的吗?是的,回购协议是私人的。我已经将我的密钥添加到我的github帐户,除非我做得不对。它将我的id_rsa指纹存储在SSH密钥下。通常情况下,您会推送到分支名称。你试过指定一个分支吗?只是试过,没有改变。你从哪里得到那个URL的?Github URL看起来像这样:
git@github.com:我的帐户/repo.git
我收到了这个错误。推动ssh://my-account@github.com:my account/my_repo.git ssh:connect to host github.com:my account port 22:操作超时致命:无法从远程存储库读取。请确保您具有正确的访问权限,并且存储库存在。我提供的URL没有
ssh://
(这是隐式的,有不同的语法。去掉ssh://没有区别,它会给出相同的错误。好的,让我们试试斜杠…
ssh://git@github.com/my account/repo.git
现在它说它不是一个存储库-account@github.com/“我的帐户/my repo.git”似乎不是git存储库致命错误:无法读取m远程存储库。我遇到此错误。正在推送到ssh://my-account@github.com:my account/my_repo.git ssh:connect to host github.com:my account port 22:操作超时致命:无法从远程存储库读取。请确保您具有正确的访问权限并且存储库存在。我提供的URL没有
ssh://
(这是隐式的,有不同的语法。去掉ssh://没有区别,它会给出相同的错误。好的,让我们试试斜杠…
ssh://git@github.com/my account/repo.git
现在它说它不是一个存储库-account@github.com/“我的帐户/my repo.git”似乎不是git存储库致命错误:无法读取m远程存储库。