当我试图跑
git push origin master --force
Run Code Online (Sandbox Code Playgroud)
我刚得到
Counting objects: 2649, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1280/1280), done.
error: RPC failed; result=22, HTTP code = 413 | 116 KiB/s
fatal: The remote end hung up unexpectedly
Writing objects: 100% (2504/2504), 449.61 MiB | 4.19 MiB/s, done.
Total 2504 (delta 1309), reused 2242 (delta 1216)
fatal: The remote end hung up unexpectedly
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)
这与不安全有关吗?我尝试在Fatal的答案中创建一个公钥:远程端意外挂断并再次运行它,但它仍然无法正常工作.我实际上没有使用钥匙吗?如果是这样,我该如何使用它?
我在http代理后面工作.我正在尝试使用他们的"repo"工具克隆Android的源代码树.
此工具坚持使用git://URL,即使http://URL也有效.结果,我无法下载源代码.
有可能强制git总是使用http吗?
编辑:我的http_proxy配置正确.例如,这有效:
git clone http://android.git.kernel.org/platform/manifest.git
Run Code Online (Sandbox Code Playgroud)
但这不会(错误=连接超时):
git clone git://android.git.kernel.org/platform/manifest.git
Run Code Online (Sandbox Code Playgroud)
所以这个答案并没有真正帮助我.
我正在关注#335部署到VPS,并且在剧集结束时,我们需要运行ssh-add以授予服务器访问github repo的权限.
问题是如何在Windows中运行它?需要安装什么?
我知道要运行ssh以访问远程服务器,我可以使用Putty.但是这个命令需要在本地运行,我知道如何使用它Putty来执行此操作.
$ git remote set-url origin https://demodev@servername.com/home/demodev/public_html/waqtpar.git`
$ git push -u origin master`
Run Code Online (Sandbox Code Playgroud)
致命:无法从重定向更新 url 基础:要求:https://demodev@servername.com:/home/demodev/public_html/waqtpar.git/info/refs?service=git-receive-pack 重定向:https:/ /demodev@servername.com:/404.html `
现在使用新的双因素身份验证变得更加重要,因为每次在终端上需要密码时都必须创建新令牌.基本上,我正在寻找与OS X中可用的osxkeychain同等的功能,我可以在Linux桌面和服务器上使用它:
git config --global credential.helper osxkeychain
Run Code Online (Sandbox Code Playgroud)
我搜索了可能的解决方案,但到目前为止我不喜欢它们中的任何一个:
cache --timeout=3600- 它最终会过期,重新输入密码会拖累新的2FA来吧,必须有一些适合Linux的基于终端的钥匙串,可以挂钩到git的credential.helper!
我正在尝试通过运行在 github 工作流程 ci 中安装 npm 依赖项npm install。但是我收到以下错误:
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/private-org/private-repo.git
npm ERR!
npm ERR! Warning: Permanently added the RSA host key for IP address 'removed' to the list of known hosts.
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)
ci.yml
name: CI
on:
push:
branches: [master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1 …Run Code Online (Sandbox Code Playgroud) (这是我在使用github时出现的问题,所以如果任何解决方案都是特定于github的话,我不介意太多.但问题本身并不是特定于github的,并且任何解决方案都不一定是无论是.)
您始终可以使用https克隆公共github存储库.
git clone https://github.com/my-user-name/SDL-mirror/
Run Code Online (Sandbox Code Playgroud)
如果你有一个github知道的SSH密钥,你也可以使用SSH克隆它.
git clone git@github.com:my-user-name/SDL-mirror.git
Run Code Online (Sandbox Code Playgroud)
(我认为使用bitbucket时类似的选项也适用.)
添加子模块时也有这两个选项.
添加子模块时,您通常会添加SSH版本,因此您可以在原位测试更改后直接从子模块提交.
但是人们试图克隆你的回购呢?他们可能没有对github的SSH访问权限.因此,他们将使用https URL克隆您的存储库...然后当git尝试使用SSH URL克隆子模块时,它会松开.
如果您使用git repo进行系统配置,这也可能是一个问题.
理想情况下,如果可能的话,我希望git从SSH URL中提取,如果不是,我希望使用https URL.这应该让每个人都可以开箱即用.有什么方法可以让它做到这一点?
我设置了密码缓存,但奇怪之处在于我认为我已经这样做了.从电子邮件到github,似乎他们改变了一些东西:
你好Thufir,
您所看到的是,默认情况下,所有新创建的repos现在都使用Smart HTTP而不是SSH.我们在这里有一篇帮助文章,解释了如何在此处进行更改:https: //help.github.com/articles/why-is-git-always-asking-for-my-password
我们在这里也有一篇关于它的博客文章:https: //github.com/blog/1104-credential-caching-for-wrist-friendly-git-usage
我看到的奇怪之处在于我似乎回想起前一段时间的那些确切方向,用于缓存密码.
此外,是否有一个更好的方法,或许有一个公钥?我不太确定我的密码缓存在哪里,但我知道这不是一个好主意.(我在Linux上,所以不能在电子邮件中使用建议的.exe.)