git常见错误
程序员文章站
2024-03-22 14:04:40
...
- 问题1
Cloning into 'kafka231'...
remote: Enumerating objects: 3860, done.
remote: Counting objects: 100% (3860/3860), done.
remote: Compressing objects: 100% (2184/2184), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
设置git缓存
git config http.postBuffer 524288000
git config https.postBuffer 524288000
对于 errno 54 这个错误,经尝试 http 或者 https 协议都无法正常提交。必须改为 ssh 方式来提交代码。也就是必须使用公私钥的方式进行账号验证,并提交代码。
ssh-****** -t rsa -C '邮箱地址'
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/yangyijun/.ssh/id_rsa):
Created directory '/Users/yangyijun/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/yangyijun/.ssh/id_rsa.
Your public key has been saved in /Users/yangyijun/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:rudC7tW03e8d5FFkgxS46S6ICO6Nu10bPTX11my+QCs aaa@qq.com
The key's randomart image is:
+---[RSA 2048]----+
| ooo.o|
| . . o.|
| .o .|
| .o. o .|
| Soo + * |
| . o..o.+o.* .|
|. . .=.o+ +E.o.+ |
| .+...=+o. .. ..+|
|.=oo oo+. . o+|
+----[SHA256]-----+
复制.ssh/id_rsa.pub内容到git的安全设置里面去。
换成:git clone aaa@qq.com:yyijun/kafka231.git 然后执行成功。
Cloning into 'kafka231'...
The authenticity of host 'github.com (52.74.223.119)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts.
remote: Enumerating objects: 3860, done.
remote: Counting objects: 100% (3860/3860), done.
remote: Compressing objects: 100% (2184/2184), done.
remote: Total 3860 (delta 1373), reused 3845 (delta 1368), pack-reused 0
Receiving objects: 100% (3860/3860), 26.20 MiB | 11.00 KiB/s, done.
Resolving deltas: 100% (1373/1373), done.