Difference between revisions of "Get started"

From Wiki
Jump to: navigation, search
(Created page with "== Setting up your Gerrit profile == In order to use Gerrit to contribute and review code you will need to add your credentials. Both SSH and HTTPS are supported, the latter...")
 
Line 1: Line 1:
== Setting up your Gerrit profile ==
+
__TOC__
 +
 
 +
= Setting up your Gerrit profile =
  
 
In order to use Gerrit to contribute and review code you will need to add your credentials.
 
In order to use Gerrit to contribute and review code you will need to add your credentials.
Line 12: Line 14:
 
Now Gerrit has a secure password for your HTTP access. When cloning a repository you will be asked to insert username and password:
 
Now Gerrit has a secure password for your HTTP access. When cloning a repository you will be asked to insert username and password:
 
use the password copied from the Gerrit settings, not your EOL password. Don't worry, you will need to insert that only once.
 
use the password copied from the Gerrit settings, not your EOL password. Don't worry, you will need to insert that only once.
 +
 +
= Clone your project =
 +
 +
This is a procedure that should work in most of the cases and is good for starters with Git and Gerrit. Experienced users can rely on their preferred cloning procedures.
 +
 +
# Navigate to the project general page ([https://forge.etsi.org/gerrit/#/admin/projects/ List of all the projects]), for example the [https://forge.etsi.org/gerrit/#/admin/projects/playground Playground project].
 +
 +
# Now select the options "Clone with commit hook" and "anonymous http" (we suggest anonymous since it seems the only way to make it work with Windows Credential helper).
 +
 +
[[File:Forge-clone-options.PNG|frame|center|The options recommended to be selected]]
 +
 +
# Copy the command shown in the page into the clipboard.
 +
 +
# Open the folder on your PC where you want the files to be put.
 +
# Right click on the white space and select "Git Bash Here".
 +
# Paste the command that you copied from Gerrit and hit "Enter"
 +
# You will be asked to insert user name and password by the WIndows Credential Helper. Insert your EOL user name and '''the HTTP password you generated in the Gerrit Settings'''. Check the "Git Bash". If it says "Unauthorized": try again the command (hit the Up key and it will be shown), this time in the Windows Credential Helper click "Cancel", then a new window will pop up where you should put again the EOL user name and the HTTP password.
 +
 +
[[File:Windows-pass-man.PNG|frame|center|The Windows Credential Helper window]]
 +
 +
'''Note''':
 +
* You can find all the project repository URLs on '''[https://forge.etsi.org/rep/ Gitweb]''' or on '''[https://forge.etsi.org/gerrit/ Gerrit]'''
 +
** On Gitweb
 +
**# Click on '''Gitweb''' menu on the portal menu bar.
 +
**# Select a product to see the available cloning URLs
 +
** On Gerrit
 +
**# Click on '''Gerrit''' menu on the portal menu bar.
 +
**# Click on "Projects" menu on the Gerrit menu bar.
 +
**# Click on "List" menu.
 +
**# Select a product to see the available cloning URLs.

Revision as of 09:15, 22 June 2017

Setting up your Gerrit profile

In order to use Gerrit to contribute and review code you will need to add your credentials. Both SSH and HTTPS are supported, the latter is recommend for starters and its usage will be explained below.

  1. Navigate to Gerrit at https://tdl.etsi.org/gerrit.
  2. Sign in (link in the top right corner) entering your EOL or TDL External credentials.
  3. Your user name will appear on the top right of the page. Click on it, the select Settings.
  4. In the menu on the left, select HTTP Password.
  5. Click on "Generate password" button.

Now Gerrit has a secure password for your HTTP access. When cloning a repository you will be asked to insert username and password: use the password copied from the Gerrit settings, not your EOL password. Don't worry, you will need to insert that only once.

Clone your project

This is a procedure that should work in most of the cases and is good for starters with Git and Gerrit. Experienced users can rely on their preferred cloning procedures.

  1. Navigate to the project general page (List of all the projects), for example the Playground project.
  1. Now select the options "Clone with commit hook" and "anonymous http" (we suggest anonymous since it seems the only way to make it work with Windows Credential helper).
File:Forge-clone-options.PNG
The options recommended to be selected
  1. Copy the command shown in the page into the clipboard.
  1. Open the folder on your PC where you want the files to be put.
  2. Right click on the white space and select "Git Bash Here".
  3. Paste the command that you copied from Gerrit and hit "Enter"
  4. You will be asked to insert user name and password by the WIndows Credential Helper. Insert your EOL user name and the HTTP password you generated in the Gerrit Settings. Check the "Git Bash". If it says "Unauthorized": try again the command (hit the Up key and it will be shown), this time in the Windows Credential Helper click "Cancel", then a new window will pop up where you should put again the EOL user name and the HTTP password.
File:Windows-pass-man.PNG
The Windows Credential Helper window

Note:

  • You can find all the project repository URLs on Gitweb or on Gerrit
    • On Gitweb
      1. Click on Gitweb menu on the portal menu bar.
      2. Select a product to see the available cloning URLs
    • On Gerrit
      1. Click on Gerrit menu on the portal menu bar.
      2. Click on "Projects" menu on the Gerrit menu bar.
      3. Click on "List" menu.
      4. Select a product to see the available cloning URLs.