|
@@ -502,6 +502,96 @@ Connectez-vous à partir de votre navigateur sur <em>git.yojik.net</em> (ou
|
|
|
<p>Voilà une capture d'écran de ce que vous devez obtenir (ici, avec le dépot de ce tutoriel)</p>
|
|
|
<p><img src="Images/gogs1.png" alt="Gogs: projet de tutoriel"></p>
|
|
|
<h3 id="tests">Tests</h3>
|
|
|
+<p>Sur la page d'administration de notre projet, nous pouvons voir les commandes à effectuer pour différentes opérations sur notre dépot:</p>
|
|
|
+<ul>
|
|
|
+<li>Création d'un dépot</li>
|
|
|
+</ul>
|
|
|
+<p><img src="Images/gogs3.png" alt="Création d'un dépot"></p>
|
|
|
+<ul>
|
|
|
+<li>Création d'un dépot: formulaire et récapitulatif</li>
|
|
|
+</ul>
|
|
|
+<p><img src="Images/gogs4.png" alt="Création d'un dépot: formulaire"></p>
|
|
|
+<p><img src="Images/gogs5.png" alt="Création d'un dépot: récapitulatif"></p>
|
|
|
+<ul>
|
|
|
+<li>Affichage des commandes disponibles pour gérer notre dépot en https</li>
|
|
|
+</ul>
|
|
|
+<p><img src="Images/gogs7.png" alt="Commandes disponibles hhps"></p>
|
|
|
+<ul>
|
|
|
+<li>Affichage des commandes disponibles pour gérer notre dépot en ssh</li>
|
|
|
+</ul>
|
|
|
+<p><img src="Images/gogs8.png" alt="Commandes disponibles ssh"></p>
|
|
|
+<ul>
|
|
|
+<li><p>Création d'un répertoire local <strong>A1</strong></p>
|
|
|
+<p> Donnez-lui le nom que vous voulez.</p>
|
|
|
+</li>
|
|
|
+</ul>
|
|
|
+<pre><code class="language-shell">eric@aldebaran:~/temp$ mkdir A1
|
|
|
+eric@aldebaran:~/temp$ cd A1
|
|
|
+eric@aldebaran:~/temp/A1$ git init
|
|
|
+Dépôt Git vide initialisé dans /home/eric/temp/A1/.git/
|
|
|
+eric@aldebaran:~/temp/A1$</code></pre>
|
|
|
+<ul>
|
|
|
+<li><p>Ajout du fichier epub au dépot local</p>
|
|
|
+<p> On copie notre fichier epub déjà existant dans notre répertoire et on l'ajoute au dépot local.</p>
|
|
|
+</li>
|
|
|
+</ul>
|
|
|
+<pre><code class="language-shell">eric@aldebaran:~/temp/A1$ cp ~/Devs/Chinois/Chinese-grammar-wiki/Epub/Grammar-wiki-A1/Chinese-grammar-wiki-A1.epub .
|
|
|
+eric@aldebaran:~/temp/A1$git add .
|
|
|
+eric@aldebaran:~/temp/A1$ git commit -m "premier commit"
|
|
|
+[master (commit racine) 381b37b] premier commit
|
|
|
+ 1 file changed, 0 insertions(+), 0 deletions(-)
|
|
|
+ create mode 100644 Chinese-grammar-wiki-A1.epub
|
|
|
+eric@aldebaran:~/temp/A1$</code></pre>
|
|
|
+<ul>
|
|
|
+<li>Ajout du fichier epub au dépot distant (sur atom) après configuration des dépots <strong>remote</strong> en <em>http</em> et <em>ssh</em></li>
|
|
|
+</ul>
|
|
|
+<pre><code class="language-shell">eric@aldebaran:~/temp/A1$ git remote add atomssh git@atom.yojik.net:eric/ChineseGrammarWiki-A1.git
|
|
|
+eric@aldebaran:~/temp/A1$ git remote add atomhttp https://git.yojik.net/eric/ChineseGrammarWiki-A1.git
|
|
|
+eric@aldebaran:~/temp/A1$ git push atomhttp master
|
|
|
+Username for 'https://git.yojik.net': eric
|
|
|
+Password for 'https://eric@git.yojik.net':
|
|
|
+Décompte des objets: 3, fait.
|
|
|
+Delta compression using up to 12 threads.
|
|
|
+Compression des objets: 100% (3/3), fait.
|
|
|
+Écriture des objets: 100% (3/3), 13.90 MiB | 6.05 MiB/s, fait.
|
|
|
+Total 3 (delta 0), reused 0 (delta 0)
|
|
|
+To https://git.yojik.net/eric/ChineseGrammarWiki-A1.git
|
|
|
+ * [new branch] master -> master
|
|
|
+eric@aldebaran:~/temp/A1$</code></pre>
|
|
|
+<ul>
|
|
|
+<li><p>Affichage des derniers commits</p>
|
|
|
+<p> <img src="Images/gogs9.png" alt="Dernier commits"></p>
|
|
|
+</li>
|
|
|
+<li><p>Test de clonage en <em>https</em></p>
|
|
|
+</li>
|
|
|
+</ul>
|
|
|
+<pre><code class="language-shell">eric@aldebaran:~/temp$ git clone https://git.yojik.net/eric/ChineseGrammarWiki-A1.git
|
|
|
+Clonage dans 'ChineseGrammarWiki-A1'...
|
|
|
+Username for 'https://git.yojik.net': eric
|
|
|
+Password for 'https://eric@git.yojik.net':
|
|
|
+remote: Décompte des objets: 3, fait.
|
|
|
+remote: Compression des objets: 100% (3/3), fait.
|
|
|
+remote: Total 3 (delta 0), reused 0 (delta 0)
|
|
|
+Dépaquetage des objets: 100% (3/3), fait.
|
|
|
+eric@aldebaran:~/temp$</code></pre>
|
|
|
+<ul>
|
|
|
+<li>Test de clonage en <em>ssh</em></li>
|
|
|
+</ul>
|
|
|
+<pre><code class="language-shell">eric@aldebaran:~/temp$ git clone git@atom.yojik.net:Repos/eric/chinesegrammarwiki-a1.git
|
|
|
+Clonage dans 'chinesegrammarwiki-a1'...
|
|
|
+remote: Décompte des objets: 3, fait.
|
|
|
+remote: Compression des objets: 100% (3/3), fait.
|
|
|
+remote: Total 3 (delta 0), reused 0 (delta 0)
|
|
|
+Réception d'objets: 100% (3/3), 13.90 MiB | 13.56 MiB/s, fait.</code></pre>
|
|
|
+<p><strong>Explications</strong></p>
|
|
|
+<p>Là, c'est un peu sioux pour trouver la bonne URL; tout d'abord, celle donnée par la page de <em>gogs</em> est fausse: il faut repérer le <strong>bon répertoire</strong> avec le <strong>bon chemin</strong> et mettre la dernière partie en minuscules pour la méthode <em>git</em>. Les URLs sont donc différentes en <em>https</em> et <em>git</em>.</p>
|
|
|
+<p>Voilà les différences entre les 2 URLs:</p>
|
|
|
+<ul>
|
|
|
+<li>git clone <a href="https://git.yojik.net/eric/ChineseGrammarWiki-A1.git">https://git.yojik.net/eric/ChineseGrammarWiki-A1.git</a></li>
|
|
|
+<li>git clone <a href="mailto:git@atom.yojik.net">git@atom.yojik.net</a>:Repos/eric/chinesegrammarwiki-a1.git</li>
|
|
|
+</ul>
|
|
|
+<p>Vous voyez que le chemin relatif, sans la partie <em>Repos</em>, est acceptée avec la méthode <em>https</em>, car le chemin <em>/home/git/Repos</em> est celui donné à <em>gogs</em> dans sa configuration de base. Par contre, avec la méthode <em>ssh</em>, il faut redonner le chemin complet, avec <em>Repos</em>.</p>
|
|
|
+<p>Gogs transforme le nom du projet en un nom tout en minuscules; ChineseGrammarWiki-A1.git devient chinesegrammarwiki-a1.git.</p>
|
|
|
</article></div><div style="background-color: #b4b2b2;width: 50px;height:50px;line-height: 50px;text-align: center;position: fixed;bottom: 10px;right: 10px;padding-top:5px;" onclick="document.documentElement.scrollTop = document.body.scrollTop =0;">
|
|
|
<svg t="1533629773982" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1035" xlink="http://www.w3.org/1999/xlink" width="40" height="40"><defs><style type="text/css">@font-face { font-family: uc-nexus-iconfont; src: url("chrome-extension://pogijhnlcfmcppgimcaccdkmbedjkmhi/res/font_9qmmi8b8jsxxbt9.woff") format("woff"), url("chrome-extension://pogijhnlcfmcppgimcaccdkmbedjkmhi/res/font_9qmmi8b8jsxxbt9.ttf") format("truetype"); }
|
|
|
</style></defs><path d="M536.255427 195.182354c-7.804756-7.804756-17.966187-11.615549-28.311813-11.615549-9.43693 0-18.874883 3.449565-26.496467 10.163477-2.360767 1.452071-4.356214 3.267417-6.352685 5.262864L218.47792 455.611735c-15.607466 15.60542-15.607466 40.834011 0 56.43943 15.607466 15.607466 41.558511 15.607466 57.167001 0l193.46013-192.733583 0 600.526219c0 22.1423 17.787108 39.927361 39.927361 39.927361 22.140253 0 39.927361-17.785062 39.927361-39.927361L548.959773 319.317583 737.15704 508.422522c15.607466 15.607466 40.469714 15.607466 56.078203 0 15.607466-15.607466 15.425318-40.834011-0.182149-56.441477L536.255427 195.182354 536.255427 195.182354z" p-id="1036" fill="#333"/><path d="M101.784174 143.097092l816.674071 0c22.140253 0 39.925315-17.785062 39.925315-39.927361 0-22.140253-17.784038-39.925315-39.925315-39.925315L101.784174 63.244416c-22.140253 0-39.927361 17.785062-39.927361 39.925315C61.856813 125.31203 79.643921 143.097092 101.784174 143.097092L101.784174 143.097092z" p-id="1037" fill="#333"/></svg>
|