Skip to content

Instantly share code, notes, and snippets.

@ArthurDelannoyazerty
Last active March 17, 2025 15:45
Show Gist options
  • Save ArthurDelannoyazerty/e3137d62a35ae2fc007cd599fa1ecc7c to your computer and use it in GitHub Desktop.
Save ArthurDelannoyazerty/e3137d62a35ae2fc007cd599fa1ecc7c to your computer and use it in GitHub Desktop.
Notes on git authentification

Clone a repository

git clone <url>

Git config

git config --global user.name "Name"
git config --global user.email [email protected]

Add the SSH keys

TODO

HTTP remote connection (If difficulties)

Replace part of the .git/config by the following (Remove the need to enter the username and password each time for github) :

# GitHub
[remote "origin"]
	url = https://github.com/<github_username>/<github_repo_name>.git
  
# GitLab
[remote "origin"]
  url = https://<remote_git_username>:<remote_git_password>@<git_server_ip>/<group_name>/<git_repo_name>.git

And do :

chmod 700 .git/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment