Git
How to use Git bash with keys for Bit Bucket
- open a git bash prompt
- type 'ssh-keygen' accept default location
- choose a passphrase
- copy to server the key
If you have already created the keys and need to use it in GitBash you need to do the
following
- Open a git bash prompt
- type ssh-keygen and note the location it is pointing to ( in window it is c/Users/<User Name>/.ssh/id_rsa ) - id_rsa is the file name
If you have the ppk file use the following steps to create a OpensSH key
- open PuTTygen and open the ppk key
- once key is open select Conversions -> Expore OpenSSH key and save it to the previous default location where it was going to create the key
- After you have the key at that location Git bash will recognize the key and use it.
For Tortoisegit
- Open windows Explorer
- Open the Contextmenu and go to TortoiseGit -> Settings
- In the opened window navigator go to Git -> Remote
- Set the path to your putty key in the corressponding "Putty key" box
Thats it!
Push a tag in Git bash use:
git push --tags
If you are running git and have a ppk in windows environment to use the git bash to connect to bitbucket you need to convert the ppk to a Open sshh key and save it in your home directory (C:\Users\XXXX\.ssh) and then use Git Bash.
The key should be in bitbucket as well.
Or you can create a new key using ssh and then use it in both location.
After you have the home directory, and a .ssh folder under that, you want to open PuTTYgen and open the key (.ppk file) you have previously created. Once your key is open, you want to select Conversions -> Export OpenSSH key and save it to HOME\.ssh\id_rsa. After you have the key at that location, Git bash will recognize the key and use it.
Comments
Post a Comment