I’m working on a side project that has me contributing to a GIT repository for source control.
Great! Only I haven’t got a freaking clue how to use it properly.
First in the list:
Pushing “Tags” up to the master repository
First thing to note is that tags are typically only noted on your local copy of the repository. They aren’t pushed up to the origin when you make a Git Push, unless you specify otherwise.
This is fine and dandy if you’re using the command line git client from the off. Me, I was using TortoiseGIT on windows, bypassing the whole setting up of GIT Bash and there isn’t a simple checkbox that I’ve found in TortoiseGIT that says “push tags” along with a Git Push. So I needed to set it up.
The command that you have to run is:
git push origin --tags
This will push any tags that you have associated with your code (TortoiseGIT can create them by just rightclicking your repository and select “add tag”) up to the origin on your master repository (in my case hosted on assembla).
However before you get to that step you’ll need to have set up your GIT Bash first, and in my case as assembla uses PKI for authentication I would need to either:
a. Create a new key for the same computer, just for the GIT bash instance and add it (what i’ve typically done in the past, but loathed because it’s just duplication of effort)
b. Figure out why “export OpenSSH version” of my keys from puttygen has never actually just worked for me.
This time around I opted for b.
Converting PPK to id_rsa
Load your private key
Conversions->Export OpenSSHand export your private key
Copy your private key to
Create the RFC 4716 version of the public key using
ssh-keygen -e -f ~/.ssh/id_rsa > ~/.ssh/id_rsa_com.pub
Convert the RFC 4716 version of the public key to the OpenSSH format:
ssh-keygen -i -f ~/.ssh/id_rsa_com.pub > ~/.ssh/id_rsa.pub
With that done, your GIT bash should now be able to authenticate correctly to your Git repository using the PPK you already use for TortoiseGIT.