出处:http://qosys.info/485/bitbucket-git-prompt-for-password

 

In some cases after adding public ssh keys for your Bitbucket account, Bitbucket could still fail with authentication and as a result it would prompt for your bitbucket password every time you pull or push.

Generally, in my case the problem was in https authentication, probably in your .git/config file you'll have something like this :

[remote "origin"]
    url = https://fvompe@bitbucket.org/linguapic/lpc.git
    fetch = +refs/heads/*:refs/remotes/origin/*

So, here some solutions for this problem :

  1. Consider changing remote url in .git/config

     

    [remote "origin"]
        url = git@bitbucket.org:linguapic/lpc.git
        fetch = +refs/heads/*:refs/remotes/origin/*

    In this way authentication still works through https and it uses your uploaded public ssh key from ~/.ssh/id_rsa.pub

  2. Another solution is to store plain password in ~/.netrc file, add following lines with your <login> and <password> :

     

    machine bitbucket.org
      login <login>
      password <password>

相关文章:

  • 2021-07-21
  • 2021-05-13
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
猜你喜欢
  • 2021-05-14
  • 2021-08-03
  • 2021-09-07
  • 2022-02-02
  • 2021-07-14
  • 2022-12-23
  • 2021-12-22
相关资源
相似解决方案