赞
踩
提交代码push的时候报错:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
原因是上传的文件过大,所以会出现以下的错误信息。网上的改法没有用,只能通过使用ssh方式提交才能解决。因此这里给出解决方法。
Total 45 (delta 12), reused 0 (delta 0), pack-reused 0
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
如果你已经配置好了ssh密钥,可以直接跳到第四步。
在生成 SSH 密钥之前,您可以检查是否有任何现有的 SSH 密钥。
注: DSA 密钥 (SSH-DSS) 不再受支持。 现有密钥将继续运行,但您不能将新的 DSA 密钥添加到您的 GitHub 帐户。
打开 Git Bash。
输入 ls -al ~/.ssh
以查看是否存在现有 SSH 密钥:
$ ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist
检查目录列表以查看是否已经有 SSH 公钥。 默认情况下,公钥的文件名是以下之一:
如果您没有现有的公钥和私钥对,或者不想使用任何可用于连接到 GitHub 的密钥对,则生成新的 SSH 密钥。
如果您看到列出的现有公钥和私钥对(例如 id_rsa.pub 和 id_rsa),并且您希望使用它们连接到 GitHub,则可以将 SSH 密钥添加到 ssh-agent。
提示:如果您收到错误“~/.ssh 不存在”,不要担心! 我们在生成新的 SSH 密钥时会创建它。
检查现有 SSH 密钥后,您可以生成新 SSH 密钥以用于身份验证,然后将其添加到 ssh-agent。
如果您还没有 SSH 密钥,则必须生成新 SSH 密钥。 如果您不确定是否已有 SSH 密钥,请检查现有密钥。
如果不想在每次使用 SSH 密钥时重新输入密码,您可以将密钥添加到 SSH 代理,让它管理您的 SSH 密钥并记住您的密码。
打开 Git Bash。
粘贴下面的文本(替换为您的 GitHub 电子邮件地址)。
$ ssh-keygen -t ed25519 -C "your_email@example.com"
**注:**如果您使用的是不支持 Ed25519 算法的旧系统,请使用以下命令:
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
这将创建以所提供的电子邮件地址为标签的新 SSH 密钥。
> Generating public/private ed25519 key pair.
提示您“Enter a file in which to save the key(输入要保存密钥的文件)”时,按 Enter 键。 这将接受默认文件位置。
> Enter a file in which to save the key (/c/Users/you/.ssh/id_ed25519):[Press enter]
在提示时输入安全密码。 更多信息请参阅“使用 SSH 密钥密码”。
> Enter pass
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。