Ver código fonte

Git SSH Command

codeskraps 6 meses atrás
pai
commit
630ac4d002

+ 8 - 1
public/index.xml

@@ -8,7 +8,7 @@
     <language>en-us</language>
     <managingEditor>me@codeskraps.com (codeskraps)</managingEditor>
     <webMaster>me@codeskraps.com (codeskraps)</webMaster>
-    <lastBuildDate>Fri, 27 Sep 2024 13:45:09 +0200</lastBuildDate>
+    <lastBuildDate>Wed, 02 Oct 2024 16:55:53 +0200</lastBuildDate>
     <atom:link href="https://codeskraps.com/index.xml" rel="self" type="application/rss+xml" />
     <item>
       <title>About Me</title>
@@ -17,6 +17,13 @@
       <guid>https://codeskraps.com/about/</guid>
       <description>&lt;p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;  &#xA;  &#xA;      &#xA;      &#xA;  &lt;picture&gt;&#xA;  &lt;img class=&#34;img-fluid&#34; src=&#34;https://codeskraps.com/images/me_codeskraps.gif?v=9df9e0930034eb1e10990a99d3ef1056&#34; alt=&#34;me&#34; loading=&#34;lazy&#34; height=&#34;107&#34; width=&#34;150&#34; /&gt;&#xA;&lt;/picture&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m a passionate and highly motivated software engineer with a deep-rooted love for technology that dates back to my first computer, an Amstrad 8256. From those early days of programming as a hobby, I&amp;rsquo;ve turned my passion into a successful career, specializing in mobile development with a focus on Android.&lt;/p&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;h2 id=&#34;professional-journey&#34;&gt;Professional Journey&lt;/h2&gt;&#xA;&lt;p&gt;Currently, I&amp;rsquo;m leading the mobile team at Game Golf, where I oversee all aspects of our mobile app development. My experience spans various domains, including:&lt;/p&gt;</description>
     </item>
+    <item>
+      <title>Configuring SSH Keys for Individual Git Commands</title>
+      <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>
+    </item>
     <item>
       <title>Simplifying MVI Architecture</title>
       <link>https://codeskraps.com/posts/mvi_architecture/</link>

+ 7 - 9
public/posts/git_ssh_command/index.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en-us">
 
-<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=49193&amp;path=livereload" data-no-instant defer></script>
+<head>
     <title>
 Configuring SSH Keys for Individual Git Commands | codeskraps
 </title>
@@ -13,7 +13,7 @@ Configuring SSH Keys for Individual Git Commands | codeskraps
 <meta name="generator" content="Hugo 0.134.3">
 
 
-<link rel="canonical" href="http://localhost:49193/posts/git_ssh_command/" >
+<link rel="canonical" href="https://codeskraps.com/posts/git_ssh_command/" >
 
 
 
@@ -31,7 +31,7 @@ Configuring SSH Keys for Individual Git Commands | codeskraps
         <header class="headerWrapper">
     <div class="header">
         <div>
-            <a class="terminal" href="http://localhost:49193/">
+            <a class="terminal" href="https://codeskraps.com/">
                 <span>me@codeskraps.com ~ $</span>
             </a>
         </div>
@@ -41,17 +41,17 @@ Configuring SSH Keys for Individual Git Commands | codeskraps
             <ul>
                 
                 <li>
-                    <a href="http://localhost:49193/projects/" title="" >
+                    <a href="https://codeskraps.com/projects/" title="" >
                         ~/projects</a>
                 </li>
                 
                 <li>
-                    <a href="http://localhost:49193/about/" title="" >
+                    <a href="https://codeskraps.com/about/" title="" >
                         ~/about</a>
                 </li>
                 
                 <li>
-                    <a href="http://localhost:49193/posts/" title="" >
+                    <a href="https://codeskraps.com/posts/" title="" >
                         ~/posts</a>
                 </li>
                 
@@ -86,8 +86,7 @@ Configuring SSH Keys for Individual Git Commands | codeskraps
     </section>
     
     <div>
-        <h1 id="configuring-ssh-keys-for-individual-git-commands">Configuring SSH Keys for Individual Git Commands</h1>
-<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>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>
 <h2 id="the-solution">The Solution</h2>
@@ -165,7 +164,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>
-<p>Happy coding!</p>
 
     </div>
 </div>

+ 19 - 0
public/posts/index.html

@@ -77,6 +77,25 @@ Posts | codeskraps
     <div>
         
 
+        <a class="postListLink" href="https://codeskraps.com/posts/git_ssh_command/">
+            
+            <div class="postListItem" role="listitem">
+                <div class="postHeader">
+                    <span class="postTitle">Configuring SSH Keys for Individual Git Commands</span>
+                    
+                    <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>
+                </div>
+            </div>
+        </a>
+
+
+        
+
         <a class="postListLink" href="https://codeskraps.com/posts/mvi_architecture/">
             
             <div class="postListItem" role="listitem">

+ 8 - 1
public/posts/index.xml

@@ -8,8 +8,15 @@
     <language>en-us</language>
     <managingEditor>me@codeskraps.com (codeskraps)</managingEditor>
     <webMaster>me@codeskraps.com (codeskraps)</webMaster>
-    <lastBuildDate>Fri, 27 Sep 2024 13:45:09 +0200</lastBuildDate>
+    <lastBuildDate>Wed, 02 Oct 2024 16:55:53 +0200</lastBuildDate>
     <atom:link href="https://codeskraps.com/posts/index.xml" rel="self" type="application/rss+xml" />
+    <item>
+      <title>Configuring SSH Keys for Individual Git Commands</title>
+      <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>
+    </item>
     <item>
       <title>Simplifying MVI Architecture</title>
       <link>https://codeskraps.com/posts/mvi_architecture/</link>

+ 3 - 0
public/sitemap.xml

@@ -6,6 +6,9 @@
   </url><url>
     <loc>https://codeskraps.com/</loc>
     <lastmod>2024-10-02T16:55:53+02:00</lastmod>
+  </url><url>
+    <loc>https://codeskraps.com/posts/git_ssh_command/</loc>
+    <lastmod>2024-10-02T16:55:53+02:00</lastmod>
   </url><url>
     <loc>https://codeskraps.com/posts/</loc>
     <lastmod>2024-10-02T16:55:53+02:00</lastmod>