Verificando autenticación…

Skip to main content

Getting Started with GitLab

We will start by preparing all the prerequisites.


Multi-Factor Authentication (MFA) for LATAM Account

Git Installation

Create and/or link the account to LATAM SSO1

important

The only service authorized to manage LATAM Airlines repositories is https://gitlab.com/latamairlines/

To use the repositories available at https://gitlab.com/latamairlines/, you must:

  1. To create an account on gitlab.com and link the account to LATAM SSO, access https://gitlab.com/groups/latamairlines/-/saml/sso?token=J39-Hyn-

  2. Enter your LATAM email:

    LATAM email entry
  3. Authorize the LATAM account for login:

    LATAM account authorization
  4. When accessing the organization now, you will see a 404 Page Not Found message.

    This is not an error

    The account was linked to LATAM SSO, but you don't have permission yet to any subgroups or projects.

  5. Go to Home:

    Go Home
  6. Access Groups, you will be able to see the organization, but you still won't be able to interact with the subgroups.

    Go Groups
    If you are a developer ...

    Now you can ask your Team Lead to add you to the sub-group or project you need.

SSH Key Authentication in GitLab

The recommendation for authenticating and performing git operations in GitLab is to use SSH keys.

note

For all examples, the SSH key name used will be: gitlab-latamairlines

  1. Create and work in the directory where SSH keys are stored:

    mkdir -p $HOME/.ssh
    cd $HOME/.ssh
  2. Create the SSH key (if it doesn't exist), for this example an EdDSA type key will be used.

    important

    We strongly recommend using a passphrase to protect the private key.

    ssh-keygen -t ed25519 -f gitlab-latamairlines
  3. Create the config file in the .ssh directory, with the following content:

    $HOME/.ssh/config
    # GitLab.com
    Host gitlab.com
    User git
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/gitlab-latamairlines
  4. To avoid having to enter the passphrase every time the SSH key is used, we can use the ssh-agent to manage private keys.

    Start the ssh agent:

    eval "$(ssh-agent -s)"

    Add the private key to the ssh agent:

    ssh-add $HOME/.ssh/gitlab-latamairlines
  5. Copy the content of the public key to the clipboard:

    Copy the public key to clipboard
    cat $HOME/.ssh/gitlab-latamairlines.pub | pbcopy
  6. Go to GitLab in the SSH keys section. User Settings > SSH Keys: https://gitlab.com/-/user_settings/ssh_keys

  7. Select the Add SSH Key button:

    • Paste the public key in the Key field.
    • Assign an identifying title in the Title field, for example: MacBook LATAM.
    • Optionally, we can assign an expiration date in the Expiration Date field.
    Add SSH key in GitLab

Get access

important

The sub-group structure in GitLab will change over time, due to the new Enterprise Architecture Taxonomy being implemented at LATAM Airlines.
This means that new groups may appear or certain groups may be removed.
The best way to visualize this structure is by accessing the latamairlines organization in GitLab.

The organization in GitLab is composed (in general) of the following levels:

  • Service Domain: VP IT Journey and Chapters.
    • Domain: Domain name that represents a main organizational unit.
      • Subdomain: Domain subdivision, which can represent specific teams or areas within the domain.
        • IT Element: IT Element ID
          • Project: Source code repository and related resources.
info

To get access to a sub-group, you must request it through the channel that the owners of each sub-group define.

More information in Services > GitLab > GitLab Sub-group Owners

Service Domains

Service DomainAcronymOwnerPath
Agility and TransformationAGTRAndres Gateño
CybersecurityCYSEAndre Pireshttps://gitlab.com/latamairlines/cyse
DataDATAAndres Bucchihttps://gitlab.com/latamairlines/data
Loyalty & Cargo (Customer Journeys)LYCARicard Vilahttps://gitlab.com/latamairlines/lyca
Operational (Operations and Business Support Functions)OPERRobert Fisherhttps://gitlab.com/latamairlines/oper
Pax & Commercial (Commercial and Services)PAXCRosario Philipshttps://gitlab.com/latamairlines/paxc
Shared ServiceSHSEIsidora Acuñahttps://gitlab.com/latamairlines/shse
Talent, Vendor and Control ManagementTVCMJC Cepeda
TechnologyTECHFrancisco Garciahttps://gitlab.com/latamairlines/tech

Incorporation of the config Directory

At the base level of the /latamairlines/ account, there is a directory called config. This directory will concentrate important repositories such as DevOps pipelines, Terraform configurations, and other shared configuration resources.

Example:

Creation of Config Directories by Service Domain

If domains wish to create their own configuration directories, they can do so by maintaining the established directory naming convention. This ensures an organized and easy-to-navigate structure.

Example Structure:

Benefits of this Structure

  • Organization: Maintains a clear and understandable hierarchy.
  • Scalability: Facilitates the incorporation of new projects and repositories.
  • Accessibility: Simplifies navigation and access to resources.
  • Consistency: Ensures that all teams follow the same conventions. -->

Footnotes

  1. SSO (Single Sign-On) means "Single Sign-On", "unified" or "single authentication".