相关疑难解决方法(0)

无法打开与身份验证代理的连接

我遇到了这个错误:

$ git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts.
!  Your key with fingerprint b7:fd:15:25:02:8e:5f:06:4f:1c:af:f3:f0:c3:c2:65 is not authorized to access bitstarter.
Run Code Online (Sandbox Code Playgroud)

我试图添加密钥,我在下面收到此错误:

$ ssh-add ~/.ssh/id_rsa.pub
Could not open a connection to your authentication agent.
Run Code Online (Sandbox Code Playgroud)

ssh ssh-agent

1473
推荐指数
29
解决办法
114万
查看次数

Git push需要用户名和密码

我从我的Github帐户克隆了一个git存储库到我的电脑.

我想使用我的PC和笔记本电脑,但有一个Github帐户.

当我尝试使用我的PC从Github推送或拉出时,它需要用户名和密码,但在使用笔记本电脑时则不需要!

每次与原点交互时,我都不想输入用户名和密码.我在这里缺少什么?

authentication github git-pull git-push git-clone

1327
推荐指数
22
解决办法
113万
查看次数

Git一直提示我输入密码

我已经使用Git一段时间了,但是不断要求输入密码开始让我感到困惑.

我正在使用OSX和Github,我按照GitHub的Set Up Git页面的指示设置了Git和我的SSH密钥 .我还在我的Mac OSX钥匙串中添加了github SSH密钥,如GitHub的SSH密钥密码页面所述.我的公钥是在Git注册的.

不过,每次我尝试git pull,我都要输入我的用户名和密码.我需要为此设置除SSH密钥以外的其他东西吗?

git github

619
推荐指数
17
解决办法
32万
查看次数

如何避免在每次git推送时指定用户名和密码?

git push我的工作到远程Git仓库.

每个人push都会提示我输入usernamepassword.我希望每次推送都能避免它,但如何配置以避免它?

git github git-push

297
推荐指数
10
解决办法
25万
查看次数

npm在package.json中依赖安装私有github存储库

我正在尝试通过npm安装github私有存储库,其中包含其他私有github存储库作为依赖项.

尝试了很多方法和帖子,但没有一个工作.这是我正在做的事情:

npm install git+https://github.com/myusername/mygitrepository.git
Run Code Online (Sandbox Code Playgroud)

在package.json中就像:

"dependencies": {
    "repository1name": "git+https://github.com/myusername/repository1.git",
    "repository2name": "git+https://github.com/myusername/repository2.git"
}
Run Code Online (Sandbox Code Playgroud)

这样做的正确方法是什么?

dependencies github node.js npm package.json

192
推荐指数
8
解决办法
16万
查看次数

Git on Bitbucket:即使在上传我的公共SSH密钥后,也总是要求输入密码

我按照说明~/.ssh/id_rsa.pub将我上传到Bitbucket的SSH密钥,但Git仍然要求我在每次操作时都输入密码(例如).我错过了什么?git pull

它是一个私有存储库(另一个人的私有存储库的分支),我克隆它像这样:

git clone git@bitbucket.org:Nicolas_Raoul/therepo.git
Run Code Online (Sandbox Code Playgroud)

这是我当地的.git/config:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = https://Nicolas_Raoul@bitbucket.org/Nicolas_Raoul/therepo.git
[branch "master"]
        remote = origin
        merge = refs/heads/master
Run Code Online (Sandbox Code Playgroud)

在具有相同公钥的相同环境中,Gitub上的Git工作正常.
.sshrwx------,.ssh/id_rsa-rw-------,.ssh/id_rsa.pub-rw-r--r--

git ssh bitbucket

171
推荐指数
8
解决办法
10万
查看次数

在Windows上启动Git Bash时运行SSH代理

我正在使用git bash.我必须使用

eval `ssh-agent.exe`
ssh-add /my/ssh/location/
Run Code Online (Sandbox Code Playgroud)

每当我开始新的git bash时.

有没有办法永久设置ssh代理?或者Windows有一个很好的方法来管理ssh密钥?

我是新手,请给我详细的教程,谢谢!

windows ssh git-bash

133
推荐指数
5
解决办法
13万
查看次数

SmartGit不会使用ssh进行身份验证

我有一个安装了gitolite的网络服务器,我使用我的ssh密钥登录.通常我只是使用命令行在服务器上使用git但是对于一个新项目,我需要在我的Windows PC上克隆一个repo,我想使用SmartGit.

但我已经花了几个小时才通过Smartgit克隆回购.作为远程Git我使用我通常会在服务器上使用的url:me @ my-server:the-repo然后过了一会儿我得到一个对话框'SSH身份验证'并且我选择了我的私钥,就像我会为pagent做的那样,并把我的密码短语.但是当我点击登录时,它只是尝试连接一段时间,然后再次向我显示"SSH身份验证"对话框.没有错误消息或任何东西.

我通过命令行尝试使用相同的数据克隆repo,并且工作得很好.那么我有什么遗失的吗?

git ssh smartgit

17
推荐指数
4
解决办法
3万
查看次数

推送到GitHub时2FA会出现问题

我在我的Raspberry Pi上的GitHub上克隆了一个项目,创建了一个新的分支并将所有内容都推送到了存储库.为此我需要下一个命令:

git clone https://www.github.com/heinpauwelyn/my_repo
git checkout -b raspberry
git push origin raspberry
Run Code Online (Sandbox Code Playgroud)

我遇到的问题是我无法将分支机构推向GitHub.com.我需要输入我的用户名和密码,但我不能使用2FA.这是Git或GitHub中的错误,是否有办法获取身份验证密钥并输入?

我不会在GitHub上启用2FA.

git github git-push two-factor-authentication

16
推荐指数
4
解决办法
8150
查看次数

Atlassian Bitbucket Cloud - ssh 身份验证 - git pull 有效,git push 失败

1. 总结问题

我按照 Bitbucket 的说明设置 ssh。

我有一个 pub/priv 密钥对,并将 pub 密钥粘贴到项目的 Bitbucket 设置(访问密钥)中。

我在 GCE VM 上有一个构建服务器。 git clone工作成功,并且git pull origin master有效。我正在使用密码。

git commit但是,如果我在 GCE VM 上对单个文件进行小更改,然后执行git push origin master,则会失败并显示以下错误消息。

Enter passphrase for key '/home/proc/.ssh/id_rsa':
Unauthorized
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)

git remote -v 节目

origin  git@bitbucket.org:<my-account>/<my-repo>.git (fetch)
origin  git@bitbucket.org:<my-account>/<my-repo>.git (push)
Run Code Online (Sandbox Code Playgroud)

如果git pull origin master工作正常,则 ssh 设置正确。 …

git bitbucket bitbucket-cloud

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