相关疑难解决方法(0)

修复msysGit Portable $ HOME位置

我已经在我的闪存驱动器上成功安装并配置了msysGit Portable,并使用它来拉动和推送GitHub repos.但是,我似乎总是不得不克服SSH支持.

具体来说,为了让SSH找到我的密钥文件,每次运行git-bash.bat时,我都必须按照这些说明启动第二个实例,ssh-agent然后启动ssh-add我的密钥.

使用ssh -v git@github.com调试的输出我看到msysGit默认使用我的Windows用户目录来查找键.它不能那样做; 我需要它在便携式驱动器上查看自己的目录.

如何强制$ HOME成为程序自己的文件夹?

破坏Vox链接的更新

此页面中的说明与我最初发布的现已断开的链接类似.引用如下.这里也是原始Vox文章webarchive.

但是,如果你尝试这个并得到:

% ssh-add
Could not open a connection to your authentication agent. 
Run Code Online (Sandbox Code Playgroud)

然后你的会话没有在ssh-agent下运行.您可以通过运行以下命令在代理下重新启动新shell来解决此问题:

exec ssh-agent bash 
Run Code Online (Sandbox Code Playgroud)

在哪里可以用你选择的shell替换bash.执行此操作后,您应该能够运行ssh-add来加载该shell的密钥.

git ssh msysgit portable-applications home-directory

20
推荐指数
1
解决办法
1万
查看次数

试图推送到BitBucket,但我得到"主conq:存储库访问被拒绝." "致命:远程端意外挂断"

我这样做是为了推动我的bitbucket存储库的更改:

$: git push origin 
master conq: repository access denied. 
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

这个错误意味着什么,我该如何解决?

bitbucket的调试信息: ssh -T -v git@bitbucket.org

OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to bitbucket.org [131.103.20.167] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/identity-cert type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa …
Run Code Online (Sandbox Code Playgroud)

git bitbucket

19
推荐指数
2
解决办法
2万
查看次数

Git服务器的主机密钥未缓存在注册表中 - GitHub.com

这里继续问题:我正在尝试在GitHub上建立我的第一个Git存储库.(注意,这意味着我不能使用putty,我正在使用openssh,或者至少我应该这样,而且我认为我是).我一直在这里关注GitHub网站上的文档.直到最后一个命令,我才把所有事情都弄清楚:git push -u origin master.它给了我以下错误:

The server's host key is not cached in the registry.
You have no guarantee that the server is the computer you think it is.
The server's rsa2 key fingerprint is: ssh-rsa 2048
16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Connection abandoned. fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

我猜这意味着在我的known_hosts文件中找不到他们的ssh-rsa密钥,但我不确定如何解决这个问题.我试过ssh -T git@github.com,我登录就好了.我也尝试关闭git bash并重新打开,以防它出现缓存问题.这不能解决问题.这是我得到的唯一输出与文档指示的不同.我希望能够建立一个甜蜜的Java Helper库,所以任何帮助都将不胜感激!

git ssh bash github

15
推荐指数
3
解决办法
2万
查看次数

GitHub:多帐户设置

我正在尝试超过3个小时为github设置多个帐户并且疲惫不堪.我已经尝试了几乎所有可能的方式在这里描述,github和文章,但没有一个工作.我也是github和Unix的新手.所以需要你的帮助来解决这个问题.在下面我正在做什么

我正在使用Windows 7并为两个不同的帐户设置了两个ssh密钥.

  1. id_rsa
  2. id_rsa_ac2

比在.sshUser的目录中创建配置文件并添加到代码下面

#Account one
Host github.com
    HostName github.com
    PreferredAuthentications publickey
    IdentityFile /c/Projects/.ssh/id_rsa

#Account two
Host ac2.github.com
    HostName github.com
    PreferredAuthentications publickey
    IdentityFile /c/Projects/.ssh/id_rsa_ac2
Run Code Online (Sandbox Code Playgroud)

现在我尝试使用下面的代码添加远程

git remote add origin git@ac2.github.com:myaccount/my.git
Run Code Online (Sandbox Code Playgroud)

并用波纹管代码推送

git push origin master
Run Code Online (Sandbox Code Playgroud)

但是,当我试图推动它给我错误: Error: Permission to myaccount/my.git denied to {account}. // where it is considering default user account and not for ac2 user account fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository …

github

7
推荐指数
1
解决办法
3196
查看次数

Git Push origin Master Hangs - cygwin w/windows 7

在Windows 7机器上使用cygwin将我的first_app推送到git hub.使用命令git push origin master我没有得到任何响应.好像它挂了,我必须ctrl c.我已经将我的ssh密钥添加到github了...谢谢.

cygwin push github windows-7

6
推荐指数
1
解决办法
1828
查看次数