Use own username/password with git and bitbucket

后端 未结 7 1739
难免孤独
难免孤独 2020-12-07 13:08

I\'m in a team of three; two are working locally, and I am working on the server.

My coworker set up the account, but gave me full privileges to the repository.

7条回答
  •  无人及你
    2020-12-07 13:50

    The prompt:

    Password for 'https://theirusername@bitbucket.org':
    

    suggests, that you are using https not ssh. SSH urls start with git@, for example:

    git@bitbucket.org:beginninggit/alias.git
    

    Even if you work alone, with a single repo that you own, the operation:

    git push
    

    will cause:

    Password for 'https://theirusername@bitbucket.org':
    

    if the remote origin starts with https.

    Check your remote with:

    git remote -v
    

    The remote depends on git clone. If you want to use ssh clone the repo using its ssh url, for example:

    git clone git@bitbucket.org:user/repo.git
    

    I suggest you to start with git push and git pull for your private repo.

    If that works, you have two joices suggested by Lazy Badger:

    • Pull requests
    • Team work

提交回复
热议问题