Git on Bitbucket:即使在上传我的公共SSH密钥后,也总是要求输入密码 [英] Git on Bitbucket: Always asked for password, even after uploading my public SSH key

查看:388
本文介绍了Git on Bitbucket:即使在上传我的公共SSH密钥后,也总是要求输入密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将〜/ .ssh / id_rsa.pub 上传至 Bitbucket的SSH密钥解释,但Git仍然要求我在每个操作中都输入密码(例如 git pull )。我是否错过了什么?

I uploaded my ~/.ssh/id_rsa.pub to Bitbucket's SSH keys as explained, but Git still asks me for my password at every operation (such as git pull). Did I miss something?

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

It is a private repository (fork of another person's private repository) and I cloned it like this:

git clone git@bitbucket.org:Nicolas_Raoul/therepo.git

这是我的本地 .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

在具有相同公钥的相同环境中,Git上的Git工作正常。

.ssh rwx ------ .ssh / id_rsa -rw ------- .ssh /id_rsa.pub -rw-r - r -

In the same environment with the same public key, Git on Github works fine.
.ssh is rwx------, .ssh/id_rsa is -rw-------, .ssh/id_rsa.pub is -rw-r--r--

推荐答案

您确定使用ssh url克隆了它吗?

Are you sure you cloned it using the ssh url?

c $ c> url = https://Nicolas_Raoul@bitbucket.org/Nicolas_Raoul/therepo.git 因此,如果使用https,它将要求输入密码,而不考虑您的ssh密钥。

The url for origin says url = https://Nicolas_Raoul@bitbucket.org/Nicolas_Raoul/therepo.git so if it is using https it will ask for password irrespective of your ssh keys.

这篇关于Git on Bitbucket:即使在上传我的公共SSH密钥后,也总是要求输入密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆