我正在努力将我的项目推到我的bitbucket上,一直在搞乱这个问题大约4天,通过无数的问题解决/页面/故障排除/教程.我不知所措,非常沮丧.我以前做过这个,但是在不同的计算机上...无论如何这里是我得到的代码/响应
~/dev/sample_app git push -u origin --all
The authenticity of host 'bitbucket.org (131.103.20.168)' can't be established.
RSA key fingerprint is 81:7b:2c:f5:6f:18:2b:7c:4b:ec:aa:46:46:74:7c:40.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
~/dev/sample_app
Run Code Online (Sandbox Code Playgroud)
我在Mac上运行10.8.4.
所以已经取得了一些进展,最初没有.ssh文件夹,所以我在开始时创建了那条路,没有known_hosts文件所以我跑了
ssh -T git@bitbucket.org
Run Code Online (Sandbox Code Playgroud)
我选择了yes,这创建了一个known_hosts文件,当我再次尝试推送时,我得到了:
~/dev/sample_app git push -u origin --all
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure …Run Code Online (Sandbox Code Playgroud) 我用vscode和remote-ssh连接我的服务器,配置后,我想连接我的主机,但失败了,对话框显示:“无法建立与XX的连接,进程试图写入一个不存在的管道。”
输出:
[16:45:20.916] Log Level: 3
[16:45:20.936] remote-ssh@0.49.0
[16:45:20.936] win32 x64
[16:45:20.944] SSH Resolver called for "ssh-remote+aliyun", attempt 1
[16:45:20.945] SSH Resolver called for host: aliyun
[16:45:20.945] Setting up SSH remote "aliyun"
[16:45:21.012] Using commit id "c47d83b293181d9be64f27ff093689e8e7aed054" and quality "stable" for server
[16:45:21.014] Install and start server if needed
[16:45:21.019] Checking ssh with "ssh -V"
[16:45:21.144] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:45:21.214] Running script with connection command: ssh -T -D 5023 aliyun bash
[16:45:21.221] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:45:21.504] >
> …Run Code Online (Sandbox Code Playgroud) ssh ssh-keys visual-studio-code vscode-settings vscode-remote
GitHub为Windows分发了一个简化的git客户端,他们称之为GitHub for Windows; 它通过GitHub帐户进行身份验证,虽然它通常对它创建的本地存储库使用SSL身份验证,但如果您告诉它使用在GitHub上具有SSH远程的现有本地存储库,它将使用您的GitHub凭据在其上设置SSH密钥GitHub为自己负责.但是它将SSH密钥保存在文件系统中的哪个位置?
注意:我不是一个新手,我已经做了很多次,但由于某种原因,今天它决定不工作.
Permission denied (publickey).尝试通过SSH连接到github或尝试克隆存储库时,我不断收到错误消息,即使在重新生成ssh密钥并将其添加到我的帐户中的"SSH密钥"之后也是如此.
这是我今天尝试做了十次没有成功的事情:
现在,当我尝试这样做ssh github.com时,它将无法工作......世界上有什么?我现在太累了还是我错过了什么?
这是来自的输出 ssh -vvv github.com
OpenSSH_5.9p1, OpenSSL 1.0.0f 4 Jan 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/trusktr/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/trusktr/.ssh/id_rsa type 1
debug1: identity file /home/trusktr/.ssh/id_rsa-cert type -1
debug1: identity file …Run Code Online (Sandbox Code Playgroud) 我已根据此处概述的过程为新服务器安装生成了SSH密钥.但是,当我将内容复制id_rsa.pub到GitHub上的我的键列表时,我收到错误消息"密钥无效.确保您已正确复制文件."
生成的密钥是有效的,我正在按原样复制它(所有在一行中,在开头/结尾没有空格).
有人知道会发生什么事吗?
我已经开发了几周的Ansible剧本,因此,我对这种技术的经验相对较短.我的部分策略包括ansible_ssh_user在整个清单中使用自定义配置主机,但是,这样的用户将需要自己的SSH密钥对,这将涉及某种用于保存/存储其对应私钥的计划.在生产环境中,该克隆/拉取该剧本并在某个剧本节点内运行,该节点的作用是配置其余的基础设施.
起初,我想把这个私钥放在playbook git存储库中,但我对它有了第二个想法,主要是因为它有一些明显的安全原因和常识,所以我需要咨询你的原因这件事.
有了这个设置,这里是后续问题:
我的ssh密钥肯定设置正确,因为我在使用ssh时从未提示输入密码.但是在部署时,capistrano仍然要求输入密码cap deploy.我设置的时候不会要求密码cap deploy:setup,奇怪的是.如果没有密码提示,它将使部署周期更加顺畅.
细节:我正在将一个Sinatra应用程序部署到Dreamhost共享帐户(使用Passenger).我曾经按照教程做了很长时间,这在当时完美无缺.从那以后出现了什么.我正在使用capistrano(2.5.9)和git版本1.6.1.1.这是我的Capfile:
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :user, 'ehsanul'
set :domain, 'jellly.com'
default_run_options[:pty] = true
# the rest should be good
set :repository, "ehsanul@jellly.com:git/jellly.git"
set :deploy_to, "/home/ehsanul/jellly.com"
set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'deploy'
set :git_shallow_clone, 1
set :scm_verbose, true
set :use_sudo, false
server domain, :app, :web
namespace :deploy do
task :migrate do
run "cd #{current_path}; /usr/bin/rake migrate environment=production"
end
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
end
after …Run Code Online (Sandbox Code Playgroud) Mac OSX Lion 10.7.
为了解决奇怪的环境问题(自制软件没有安装wget,我有各种奇怪的块和错误),我卸载了zschrc和homebrew以及其他一些东西,然后安装了fish shell.
现在,每当我尝试向/从github推送/拉出时,我都会收到此错误:
The authenticity of host 'github.com (204.232.175.90)' can't be established.
RSA key fingerprint is <string of colon-separated chars that I should probs keep private>.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/Users/sasha/.ssh/known_hosts).
Run Code Online (Sandbox Code Playgroud)
所以我试着检查我的〜./ ssh文件夹的权限,并得到了这个,这对我来说很好看:
-rw-r--r-- 1 sasha staff 97B Jul 9 22:56 config
-rw------- 1 sasha staff 1.7K May 16 2012 id_rsa
-rw-r--r-- 1 sasha staff 403B May 16 2012 …Run Code Online (Sandbox Code Playgroud) 我正在尝试将生成的密钥添加到 ssh 代理。下面是我的步骤
C:\repo>ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\mante1/.ssh/id_rsa):C:\repo\key
Run Code Online (Sandbox Code Playgroud)
生成密钥后,我将启动 ssh 代理并添加它
C:\repo>start-ssh-agent
Found ssh-agent at 13460
Found ssh-agent socket at /tmp/ssh-vKzdrs37QYVK/agent.821
C:\repo>ssh-add ~/.ssh/id_rsa
Error connecting to agent: No such file or directory
Run Code Online (Sandbox Code Playgroud) 我有以下问题:
$ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我已经检查了这样做的连接:
$ ssh -vT git@github.com
Run Code Online (Sandbox Code Playgroud)
和输出看起来不错,我被正确认证.
在进一步检查时,我注意到:
$ ssh-add -l
The agent has no identities.
Run Code Online (Sandbox Code Playgroud)
我试过运行ssh-agent,但没有改变:
$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-A1mhFqvqncuO/agent.766; export SSH_AUTH_SOCK;
SSH_AGENT_PID=767; export SSH_AGENT_PID;
echo Agent pid 767;
$ ssh-add -l
Could not open a connection to your authentication agent.
Run Code Online (Sandbox Code Playgroud)
我正在使用Arch Linux.任何帮助将非常感谢!提前致谢!