GitHub

Software code version control

devops
github
GitHub is a software development platform in the cloud. It’s used for storing, tracking, and collaborating on software projects.
Author

albertprofe

Published

Tuesday, June 1, 2021

Modified

Saturday, September 7, 2024

GitHub logo

GitHub logo

1 Overview

GitHub is a software development platform in the cloud. It’s used for storing, tracking, and collaborating on software projects.

GitHub users create accounts, upload files, and create coding projects. But the real work of GitHub happens when users begin to collaborate.

2 Install CLI gh

Installing gh on Linux and BSD

type -p curl >/dev/null || sudo apt install curl -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y

if for some reasson gh does not install, try it another time:

sudo apt update
sudo apt install gh

GitHub CLI manual

3 Login and logout to GitHub.com from CLI gh on linux

3.1 Global variables

Creating global credential, if working in a VM

GitHub tasks:

Create repository, commit and push files to repository with Sync tool. To write our repository you need to:

  • Create Token on GitHub.com: Creating a personal access token

  • Use this token on your Visual Code - Git, link:

    $git config --global user.name "Mona Lisa
    $git config --global user.mail "monalisa@davinci.com"
    $git config --global user.paasword "4WTVEG43_Q34WG435GAWER4_Q4vsrsrggr_3D44"

3.2 CLI gh

Log in CLI set-up

Log in CLI set-up

Redirection to browser and input code

Redirection to browser and input code

Login succesfull

Login succesfull

Log out

Log out

more info on

3.3 Register an existing account with a token with IntelliJ IDEA 2022.3

IntelliJ IDEA lets you manage Git projects hosted on GitHub directly from the IDE: clone repositoriesshare your projectscreate forksshare code through gistscreate pull requests and review incoming pull requests.

Register an existing account with a token