How to manage the Authentication?
Use SSH KEY:
And if you have a repository that was managed with password, change the URL
$ git remote set-url origin ssh://[email protected]/<workspace_ID>/<repo_name>/.git
Update the URL for Git repositories
- From a terminal, navigate to the repository. $ cd ~/<path_to_repo>
- Run git remote -v to see the current remote URL.$ git remote -v
origin https://[email protected]/tutorials/tutorials.git.bitbucket.org.git (fetch)
origin https://[email protected]/tutorials/tutorials.git.bitbucket.org.git (push)
- Update the remote URL with git remote set-url using the current and new remote URLs.
$ git remote set-url origin [email protected]:tutorials/tutorials.git
If you update your URL from HTTPS to SSH, next time you push or pull from your repository, the terminal responds that it is adding the Bitbucket host to the list of known hosts. You also won’t have to enter a password.