Jessica-13 / golang-project

0 stars 0 forks source link

Créer un dépôt git pour le projet. #1

Open Jessica-13 opened 2 years ago

Jessica-13 commented 2 years ago

$ git init

$ git clone https://github.com/User/HTTPSProject.git (Copier l'adresse HTTPS du dossier depuis GitHub)

$ git add *

$ git commit -m "message"

$ git push origin main

Jessica-13 commented 2 years ago

En cas de problèmes du type :

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

Voir :

https://stackoverflow.com/questions/68775869/support-for-password-authentication-was-removed-please-use-a-personal-access-to

Jessica-13 commented 2 years ago

Documentation

Git : https://git-scm.com/doc

GitHub : https://docs.github.com/en

Jessica-13 commented 2 years ago

For a Linux-based OS ⤴

For Linux, you need to configure the local GIT client with a username and email address,

$ git config --global user.name "your_github_username"
$ git config --global user.email "your_github_email"
$ git config -l

Once GIT is configured, we can begin using it to access GitHub. Example:

$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
> Cloning into `Spoon-Knife`...
$ Username for 'https://github.com' : username
$ Password for 'https://github.com' : give your personal access token here

Now cache the given record in your computer to remembers the token:

$ git config --global credential.helper cache

If needed, anytime you can delete the cache record by:

$ git config --global --unset credential.helper
$ git config --system --unset credential.helper

Now try to pull with -v to verify

$ git pull -v