Ever experience that every time you pull or push to bitbucket it ask you to enter password if not both username and password?
Theres a better way to push and pull to git using ssh.
- Generate public and private keys
$> ssh-keygen -t rsa
If you already created ssh keys before then just copy the content of the public key
$> cat ~/.ssh/id_rsa.pub
If you are using bitbucket, go to settings
and create ssh key the you copy
Take note to use the “SSH” version before cloning. or if you’re already using HTTPS, just edit git/config then replace the URL.
$> nano .git/config
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = email@example.com:myteam/repo.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master