如何返回使用https而不是ssh

时间:2013-05-11 08:07:11

标签: maven-3 bitbucket

我正在尝试为我的maven项目配置jgitflow插件,并且已将<scm>标记添加到我的pom.xml。但是最初我使用了ssh url而不是https url,从那以后(即使我删除了<scm>标签或将网址更改为https)我得到了以下内容:

[adam@deathstar myproject]$ git push
The authenticity of host 'bitbucket.org (207.223.240.181)' can't be established.
RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.

或者这个:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

如何返回使用https?

1 个答案:

答案 0 :(得分:3)

我自己找到了解决方案。 我必须编辑配置文件:.git/config

[core]部分,我必须将url的值更改为使用https://username@bitbucket.org而不是git@bitbucket.org