Git Authentication

Fumbani Banda Dec 19, 2022
  1. Create Local Repo From Scratch in Git
  2. Create a Local Repo for an Existing Project
  3. Connect Local Repo to GitHub
Git Authentication

This tutorial demonstrates connecting a local repository to a remote repository on GitHub/Gitlab without getting the authentication failed error message.

Create Local Repo From Scratch in Git

To create a local repository from scratch, follow the following steps.

Create a Local Repo for an Existing Project

To create a local repository for an existing project, follow the following steps.

  1. Get inside the directory of the project
  2. Type git init to initialize the project to a Git repository
  3. Type git add . to add all the files
  4. Type git commit -m "First Commit" to capture the changes made to a Git repository.

Connect Local Repo to GitHub

Once you have a local repository set up, the following instructions provide a guide on connecting to to a remote repository on GitHub.

Fumbani Banda avatar Fumbani Banda avatar

Fumbani is a tech enthusiast. He enjoys writing on Linux and Python as well as contributing to open-source projects.

LinkedIn GitHub