# Comment push avec github ?

**URL:** <https://www.debian-fr.org/t/comment-push-avec-github/58169>\
**Category:** Pause Café\
**Created:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169 "2016-02-21T17:37:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morrio](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@Morrio](https://www.debian-fr.org/u/Morrio)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/1 "2016-02-21T17:37:24Z")

</div>

Bonjour,

Je monte un jeu open source, mais je rencontré des problèmes.

Dans un premier temps j’installe le git.

```auto

```

Sa marche.

Ensuite j’écris ses commandes :

`git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto`

Sa marche parfaitement car j’ai vérifier avec cette commande `vim ~/.gitconfig`

Je met mon pseudo et mon adresse mail avec sa :

[code]git config --global [user.name](http://user.name) “votre\_pseudo”

git config --global user.email [moi@email.com](mailto:moi@email.com)[/code]

Sa marche aussi.

Ensuite je créer un dépôt

`mkdir nom_depot
cd nom_depot
git init`

Sa marche aussi.

je fais `git pull` sa télécharge les fichiers sa marche aussi.

Pour faire une modification je crois qu’il faut utiliser la commande git clone mais je n’arrive pas à l’utiliser sur les protocoles SSH.

Un commit c’est quoi ?

---

<div class="post-metadata">

**Author:** ![thuban](https://www.debian-fr.org/user_avatar/www.debian-fr.org/thuban/32/4177_2.png) [@thuban](https://www.debian-fr.org/u/thuban)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/2 "2016-02-21T17:37:25Z")

</div>

[size=50]mode troll : mercurial c’est mieux![/size]

git clone, c’est pour récupérer un dépot et le mettre sur ton ordi  
git pull, c’est pour récupérer les derniers changements  
git add, c’est pour ajouter un fichier nouveau ou modifié  
git commit sert à enregistrer les changements  
git push sert à envoyer sur le serveur les changements.

Certes, ce n’est pas agréable car c’est un apprentissage en plus, mais un tuto sur git te ferait du bien ([size=50]même si mercurial c’est plus simple…[/size])

Tu peux aussi te procurer un livre : [raphaelhertzog.fr/livre/memento-git/](http://raphaelhertzog.fr/livre/memento-git/)

Bon courage pour ton projet!

---

<div class="post-metadata">

**Author:** ![Morrio](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@Morrio](https://www.debian-fr.org/u/Morrio)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/3 "2016-02-21T17:37:29Z")

</div>

`git push https://github.com/Morrio/justeprix.git
Username for 'https://github.com': Morrio
Password for 'https://Morrio@github.com': 
Everything up-to-date
`

Pourquoi je ne vois rien à jour ?

---

<div class="post-metadata">

**Author:** ![fran.b](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/f/d78d45/32.png) [@fran.b](https://www.debian-fr.org/u/fran.b)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/4 "2016-02-21T17:37:30Z")

</div>

Initialisation:  
git init

# ci dessous uniquement si accès https

git remote add origin [github.com/FBoisson/Camllight.git](https://github.com/FBoisson/Camllight.git)  
(par exemple)

puis si tu veux ajouter tous les fichiers du répertoire:  
git add \*  
git commit  
(là tu met du blabla)  
git push origin master

pour cloner sur une machine

git clone [git@github.com](mailto:git@github.com):FBoisson/Camllight.git

par exemple

---

<div class="post-metadata">

**Author:** ![Morrio](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@Morrio](https://www.debian-fr.org/u/Morrio)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/5 "2016-02-21T17:37:33Z")

</div>

`mario@Mario:~/Documents/Programmation/Projet$ git push origin master
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
`

Sa ne veux pas push ☹.

Dans git commit généralement on met quoi dedans ?

---

<div class="post-metadata">

**Author:** ![fran.b](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/f/d78d45/32.png) [@fran.b](https://www.debian-fr.org/u/fran.b)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/6 "2016-02-21T17:37:33Z")

</div>

git remote add origin\_ [git@github.com](mailto:git@github.com):…etc…

---

<div class="post-metadata">

**Author:** ![Morrio](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@Morrio](https://www.debian-fr.org/u/Morrio)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/7 "2016-02-21T17:37:34Z")

</div>

`mario@Mario:~/Documents/Programmation/Projet$ git push origin master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
`  
Pourquoi ?

---

<div class="post-metadata">

**Author:** ![fran.b](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/f/d78d45/32.png) [@fran.b](https://www.debian-fr.org/u/fran.b)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/8 "2016-02-21T17:37:39Z")

</div>

Parce que tu dois avoir les droits pour mettre tes contributions ou bien parce que tu n’as pas donné ta clef ssh. Tu devrais regarder la doc de GitHUB, elle est claire je trouve.

---

<div class="post-metadata">

**Author:** ![Morrio](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@Morrio](https://www.debian-fr.org/u/Morrio)\
**Post date:** [Février 21, 2016, 5:37 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/9 "2016-02-21T17:37:45Z")

</div>

Le problème viens de la clée j’ai oublier de push ma clée^^

Mais comment je peux rentré dans le fichier root ?

J’ai besoin d’aller dans le fichier root pour pouvoir accéder au fichier .shh pour avoir ma clée.

---

<div class="post-metadata">

**Author:** ![Morrio](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@Morrio](https://www.debian-fr.org/u/Morrio)\
**Post date:** [Février 21, 2016, 5:39 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/10 "2016-02-21T17:39:48Z")

</div>

> [@](#):
>
> sudo nautilus

Elle permet d’aller le répertoire root en interface graphique.

J’ai ajouter ma clée :

`The authenticity of host 'github.com (204.232.175.XX)' can't be established.
RSA key fingerprint is XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,204.232.175.XX' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
`

Sa ne marche pas 😕

---

<div class="post-metadata">

**Author:** ![Morrio](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@Morrio](https://www.debian-fr.org/u/Morrio)\
**Post date:** [Février 21, 2016, 5:39 UTC](https://www.debian-fr.org/t/comment-push-avec-github/58169/11 "2016-02-21T17:39:50Z")

</div>

J’ai lus et suivis les indications de la doc sur l’erreur “Permission denied (publickey).” maintenant sa marche.
