Git


How to use Git bash with keys for Bit Bucket

  1.  open a git bash prompt 
  2.  type 'ssh-keygen' accept default location 
  3.  choose a passphrase
  4.  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

  1. Open a git bash prompt
  2. 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

  1. open PuTTygen and open the ppk key 
  2. 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
  3. After you have the key at that location Git bash will recognize the key and use it.
For Tortoisegit 
  1.  Open windows Explorer
  2.  Open the Contextmenu and go to TortoiseGit -> Settings
  3.  In the opened window navigator go to Git -> Remote
  4.  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

Popular posts from this blog

API design best practices

DB Connection Issues

Reading Excel Sheet on client side and processing it