Przeglądaj źródła

Add <more> to git ssh command post

codeskraps 6 miesięcy temu
rodzic
commit
7e78de7c6e

+ 1 - 1
content/posts/git_ssh_command.md

@@ -5,7 +5,7 @@ tags = ['git', 'ssh']
 draft = false
 +++
 When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn't yet a local `.git/config` file to modify.
-
+<!--more-->
 ## The Problem
 
 Imagine you're working on a project that requires you to clone a repository using a specific SSH key. Normally, you might edit your SSH config file or the repository's `.git/config` file. But what if you're just getting started and don't have these files set up yet?

+ 1 - 1
public/index.xml

@@ -22,7 +22,7 @@
       <link>https://codeskraps.com/posts/git_ssh_command/</link>
       <pubDate>Wed, 02 Oct 2024 16:55:53 +0200</pubDate><author>me@codeskraps.com (codeskraps)</author>
       <guid>https://codeskraps.com/posts/git_ssh_command/</guid>
-      <description>&lt;p&gt;When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&amp;rsquo;t yet a local &lt;code&gt;.git/config&lt;/code&gt; file to modify.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;&#xA;&lt;p&gt;Imagine you&amp;rsquo;re working on a project that requires you to clone a repository using a specific SSH key. Normally, you might edit your SSH config file or the repository&amp;rsquo;s &lt;code&gt;.git/config&lt;/code&gt; file. But what if you&amp;rsquo;re just getting started and don&amp;rsquo;t have these files set up yet?&lt;/p&gt;</description>
+      <description>&lt;p&gt;When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&amp;rsquo;t yet a local &lt;code&gt;.git/config&lt;/code&gt; file to modify.&lt;/p&gt;</description>
     </item>
     <item>
       <title>Simplifying MVI Architecture</title>

+ 0 - 1
public/posts/git_ssh_command/index.html

@@ -170,7 +170,6 @@ This command will show you all files in your SSH directory, including your key f
 <h2 id="conclusion">Conclusion</h2>
 <p>Using the <code>-c</code> flag with Git commands provides a flexible way to configure SSH settings on a per-command basis. This is especially useful when working with new repositories or in environments where you can&rsquo;t or don&rsquo;t want to modify global configurations. By mastering this technique, you can streamline your Git workflows and handle complex authentication scenarios with ease.</p>
 <p>Remember, while the <code>-c</code> flag method is convenient for one-off commands, for long-term projects, it&rsquo;s usually better to set up your SSH config file or the repository&rsquo;s <code>.git/config</code> for a more permanent solution.</p>
-
     </div>
 </div>
 

+ 1 - 3
public/posts/index.html

@@ -86,9 +86,7 @@ Posts | codeskraps
                     <time class="postDate" datetime="2024-10-02">October 2, 2024</time>
                 </div>
                 <div class="postExcerpt">
-                    <p><p>When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&rsquo;t yet a local <code>.git/config</code> file to modify.</p>
-<h2 id="the-problem">The Problem</h2>
-<p>Imagine you&rsquo;re working on a project that requires you to clone a repository using a specific SSH key. Normally, you might edit your SSH config file or the repository&rsquo;s <code>.git/config</code> file. But what if you&rsquo;re just getting started and don&rsquo;t have these files set up yet?</p></p>
+                    <p><p>When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&rsquo;t yet a local <code>.git/config</code> file to modify.</p></p>
                 </div>
             </div>
         </a>

+ 1 - 1
public/posts/index.xml

@@ -15,7 +15,7 @@
       <link>https://codeskraps.com/posts/git_ssh_command/</link>
       <pubDate>Wed, 02 Oct 2024 16:55:53 +0200</pubDate><author>me@codeskraps.com (codeskraps)</author>
       <guid>https://codeskraps.com/posts/git_ssh_command/</guid>
-      <description>&lt;p&gt;When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&amp;rsquo;t yet a local &lt;code&gt;.git/config&lt;/code&gt; file to modify.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;&#xA;&lt;p&gt;Imagine you&amp;rsquo;re working on a project that requires you to clone a repository using a specific SSH key. Normally, you might edit your SSH config file or the repository&amp;rsquo;s &lt;code&gt;.git/config&lt;/code&gt; file. But what if you&amp;rsquo;re just getting started and don&amp;rsquo;t have these files set up yet?&lt;/p&gt;</description>
+      <description>&lt;p&gt;When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&amp;rsquo;t yet a local &lt;code&gt;.git/config&lt;/code&gt; file to modify.&lt;/p&gt;</description>
     </item>
     <item>
       <title>Simplifying MVI Architecture</title>

+ 1 - 3
public/tags/git/index.html

@@ -86,9 +86,7 @@ Git | codeskraps
                     <time class="postDate" datetime="2024-10-02">October 2, 2024</time>
                 </div>
                 <div class="postExcerpt">
-                    <p><p>When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&rsquo;t yet a local <code>.git/config</code> file to modify.</p>
-<h2 id="the-problem">The Problem</h2>
-<p>Imagine you&rsquo;re working on a project that requires you to clone a repository using a specific SSH key. Normally, you might edit your SSH config file or the repository&rsquo;s <code>.git/config</code> file. But what if you&rsquo;re just getting started and don&rsquo;t have these files set up yet?</p></p>
+                    <p><p>When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&rsquo;t yet a local <code>.git/config</code> file to modify.</p></p>
                 </div>
             </div>
         </a>

+ 1 - 1
public/tags/git/index.xml

@@ -15,7 +15,7 @@
       <link>https://codeskraps.com/posts/git_ssh_command/</link>
       <pubDate>Wed, 02 Oct 2024 16:55:53 +0200</pubDate><author>me@codeskraps.com (codeskraps)</author>
       <guid>https://codeskraps.com/posts/git_ssh_command/</guid>
-      <description>&lt;p&gt;When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&amp;rsquo;t yet a local &lt;code&gt;.git/config&lt;/code&gt; file to modify.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;&#xA;&lt;p&gt;Imagine you&amp;rsquo;re working on a project that requires you to clone a repository using a specific SSH key. Normally, you might edit your SSH config file or the repository&amp;rsquo;s &lt;code&gt;.git/config&lt;/code&gt; file. But what if you&amp;rsquo;re just getting started and don&amp;rsquo;t have these files set up yet?&lt;/p&gt;</description>
+      <description>&lt;p&gt;When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&amp;rsquo;t yet a local &lt;code&gt;.git/config&lt;/code&gt; file to modify.&lt;/p&gt;</description>
     </item>
   </channel>
 </rss>

+ 1 - 3
public/tags/ssh/index.html

@@ -86,9 +86,7 @@ Ssh | codeskraps
                     <time class="postDate" datetime="2024-10-02">October 2, 2024</time>
                 </div>
                 <div class="postExcerpt">
-                    <p><p>When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&rsquo;t yet a local <code>.git/config</code> file to modify.</p>
-<h2 id="the-problem">The Problem</h2>
-<p>Imagine you&rsquo;re working on a project that requires you to clone a repository using a specific SSH key. Normally, you might edit your SSH config file or the repository&rsquo;s <code>.git/config</code> file. But what if you&rsquo;re just getting started and don&rsquo;t have these files set up yet?</p></p>
+                    <p><p>When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&rsquo;t yet a local <code>.git/config</code> file to modify.</p></p>
                 </div>
             </div>
         </a>

+ 1 - 1
public/tags/ssh/index.xml

@@ -15,7 +15,7 @@
       <link>https://codeskraps.com/posts/git_ssh_command/</link>
       <pubDate>Wed, 02 Oct 2024 16:55:53 +0200</pubDate><author>me@codeskraps.com (codeskraps)</author>
       <guid>https://codeskraps.com/posts/git_ssh_command/</guid>
-      <description>&lt;p&gt;When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&amp;rsquo;t yet a local &lt;code&gt;.git/config&lt;/code&gt; file to modify.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;&#xA;&lt;p&gt;Imagine you&amp;rsquo;re working on a project that requires you to clone a repository using a specific SSH key. Normally, you might edit your SSH config file or the repository&amp;rsquo;s &lt;code&gt;.git/config&lt;/code&gt; file. But what if you&amp;rsquo;re just getting started and don&amp;rsquo;t have these files set up yet?&lt;/p&gt;</description>
+      <description>&lt;p&gt;When working with Git repositories, you often need to authenticate using SSH keys. While you can configure SSH settings globally, there are times when you need to use a specific SSH key for just one command. This is particularly useful when cloning a new repository or adding a submodule, where there isn&amp;rsquo;t yet a local &lt;code&gt;.git/config&lt;/code&gt; file to modify.&lt;/p&gt;</description>
     </item>
   </channel>
 </rss>