Migration To Git

From Developer Documents
Revision as of 07:37, 16 August 2016 by Hannu Niemisto (talk | contribs)
Jump to navigation Jump to search

Gerrit

  1. Request a Gerrit account.
  2. Generate SSH Public/Private key
    • Windows
      • Install PuTTY (msi) or download only PuTTYgen (exe) (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
      • Run PuTTYgen and generate a key
        • Press Generate button
        • Move your mouse over the window until the progress bar is finished
        • Write a Key passphrase to protect your private key in case your local machine is compromised.
        • Save the generated public and private keys to C:\Users\{username}\.ssh.
    • Linux
      • Generate public and private keys using ssh-keygen.
  3. Go to http://www.simantics.org:8088/r/ and log in with your Gerrit username/password
  4. Select your name in the top-right corner and pressSettings
  5. Go to section SSH Public Keys, select Add Key ....
  6. Open the file containing the generated public key in text editor and paste its content to the box in Gerrit and and press Add

Eclipse

  1. Go to preferences (General / Network Connections / SSH2) and ensure that SSH2 home points to the directory where you generated the private key.
  2. Open Git perspective
  3. Press button Clone a Git Repository and add the clone to this view (third button in the toolbar of Git view)
  4. Select Clone URI (Don't select Gerrit, it doesn't work very well at the moment)
  5. Go back to Gerrit. Press Projects in the top-left menu and List in the submenu.Repositories
  6. Find a row named simantics/platform and press (gitweb) link at the last column.
  7. Copy the URI starting with ssh: (ssh://{username}@www.simantics.org:29418/simantics/platform.git) and paste it to URI field in Clone Git Repository dialog.
  8. This should automatically fill the other fields.
  9. Press Next. If your private key has a passphrase, Eclipse now asks it.
  10. Select all branches to be cloned (default) and press Next.
  11. Give a local directory where the repository is cloned to and press Finish.
  12. After the cloning is finished, select the platform repository in the Git Repositories view and select Import Projects... from context menu.
  13. Press Next, select all projects (default) and press Finish.