<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Haru Blank</title>
    <description>The latest articles on DEV Community by Haru Blank (@harublank00).</description>
    <link>https://dev.to/harublank00</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1298915%2F2e8a713d-df16-495a-977c-d35a5822dd90.jpg</url>
      <title>DEV Community: Haru Blank</title>
      <link>https://dev.to/harublank00</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/harublank00"/>
    <language>en</language>
    <item>
      <title>Todo app with go and gqlgen. Just need to add socket now</title>
      <dc:creator>Haru Blank</dc:creator>
      <pubDate>Sat, 23 Mar 2024 06:27:06 +0000</pubDate>
      <link>https://dev.to/harublank00/todo-app-with-go-and-gqlgen-5fk0</link>
      <guid>https://dev.to/harublank00/todo-app-with-go-and-gqlgen-5fk0</guid>
      <description>&lt;p&gt;Hello everyone,&lt;br&gt;
I'm currently delving into learning Apollo Client. I've set up GraphQL with Go and gqlgen, and while queries and mutations are working fine, I'm encountering an issue when trying to connect to subscriptions on the client side. I keep receiving a network error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbvtahnw1vmv184k70gs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsbvtahnw1vmv184k70gs.png" alt="Error Message for goql subscription" width="800" height="92"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's my go server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s"&gt;"net/http"&lt;/span&gt;
    &lt;span class="s"&gt;"server/graph"&lt;/span&gt;

    &lt;span class="s"&gt;"github.com/99designs/gqlgen/graphql/handler"&lt;/span&gt;
    &lt;span class="s"&gt;"github.com/99designs/gqlgen/graphql/handler/transport"&lt;/span&gt;
    &lt;span class="s"&gt;"github.com/99designs/gqlgen/graphql/playground"&lt;/span&gt;
    &lt;span class="s"&gt;"github.com/go-chi/chi"&lt;/span&gt;
    &lt;span class="s"&gt;"github.com/gorilla/websocket"&lt;/span&gt;
    &lt;span class="s"&gt;"github.com/rs/cors"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;router&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;chi&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewRouter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Options&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;AllowedOrigins&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"http://localhost:5173"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="n"&gt;AllowCredentials&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;Debug&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;            &lt;span class="no"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Handler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;srv&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewDefaultServer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;NewExecutableSchema&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Config&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;Resolvers&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Resolver&lt;/span&gt;&lt;span class="p"&gt;{}}))&lt;/span&gt;
    &lt;span class="n"&gt;srv&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddTransport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;transport&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Websocket&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Upgrader&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;websocket&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Upgrader&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;CheckOrigin&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c"&gt;// Check against your desired domains here&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="n"&gt;ReadBufferSize&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;WriteBufferSize&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;playground&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Graphql playground"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"/query"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/query"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;srv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ListenAndServe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;":8080"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;panic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Could anyone provide assistance in resolving this issue? I would greatly appreciate any guidance or insights you can offer.&lt;br&gt;
Thank you!&lt;/p&gt;

&lt;p&gt;Here's Github repo: &lt;a href="https://github.com/haruBlank00/graphql-go-todo"&gt;https://github.com/haruBlank00/graphql-go-todo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>react</category>
      <category>websocket</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Simplifying GitHub Authentication: Adding and Managing Multiple SSH Keys 🤯</title>
      <dc:creator>Haru Blank</dc:creator>
      <pubDate>Sun, 17 Mar 2024 08:20:02 +0000</pubDate>
      <link>https://dev.to/harublank00/simplifying-github-authentication-adding-and-managing-multiple-ssh-keys-42p1</link>
      <guid>https://dev.to/harublank00/simplifying-github-authentication-adding-and-managing-multiple-ssh-keys-42p1</guid>
      <description>&lt;p&gt;Github provides us options to access private repo through HTTPS and SSH. I don’t know much detail and differences but basically, with HTTPS we have to use our Github username and personal access tokens while with SSH we use SSH key stored somewhere in you system for authentication.&lt;/p&gt;

&lt;p&gt;This log is regarding SSH authentication and how we can keep multiple SSH key.&lt;/p&gt;

&lt;p&gt;We will see how we can generate SSH and connect it with our Github. We will Also see how we can add multiple SSH key for multiple Github accounts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generating SSH Keys and Connecting to GitHub:&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Generate SSH Keys:
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Let’s Open our terminal
- We can Generate SSH keys using the following command:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; rsa &lt;span class="nt"&gt;-b&lt;/span&gt; 4096 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your-email@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;ssh-keygen&lt;/code&gt;&lt;/strong&gt;: This is the command-line utility used to generate SSH keys.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;-t rsa&lt;/code&gt;&lt;/strong&gt;: This option specifies the type of key to create. In this case, it specifies that we want to generate an RSA key. RSA is a widely used algorithm for public-key cryptography. Default file name file be &lt;code&gt;id_ALGORITHM&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;-b 4096&lt;/code&gt;&lt;/strong&gt;: This option specifies the number of bits in the key. In this case, it specifies that we want to generate a 4096-bit key. Generally, larger key sizes provide stronger security but may take longer to generate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;-C "your-email@example.com"&lt;/code&gt;&lt;/strong&gt;: This option allows US to add a comment to the key. The comment is typically used to identify the key and can be our email address or any other identifier we choose. Adding a comment is optional, but it can be helpful for managing multiple keys.&lt;/p&gt;

&lt;p&gt;This will create a new SSH key, using the email as a label for SSH file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Generating public/private ALGORITHM key pair.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will be prompted to enter a file where we want to save our key.&lt;br&gt;
By default the file name will be &lt;code&gt;id_ALGORITHM&lt;/code&gt; , we can use any custom name and in fact we should use a custom name so we can use multiple SSH conveniently.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;Enter&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;which&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;save&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nf"&gt;key &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/home/&lt;/span&gt;&lt;span class="nx"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;id_rsa&lt;/span&gt;&lt;span class="p"&gt;):[&lt;/span&gt;&lt;span class="nx"&gt;Press&lt;/span&gt; &lt;span class="nx"&gt;enter&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can name our files like &lt;code&gt;id_rsa_personal&lt;/code&gt; , &lt;code&gt;id_rsa_opensource&lt;/code&gt; or any other name.&lt;br&gt;
Once we enter our file name, it will create two files for us. &lt;br&gt;
One with private key and another with &lt;code&gt;.pub&lt;/code&gt; extension with same name which will be our public key.&lt;br&gt;
These files will be generated inside &lt;code&gt;ssh&lt;/code&gt; folder. &lt;br&gt;
I am in Ubuntu WSL so mine is &lt;code&gt;~/.ssh&lt;/code&gt;. Your might be different so find yours. &lt;br&gt;
These are just text files with SSK key inside them. &lt;br&gt;
We add the public key with &lt;code&gt;.pub&lt;/code&gt; extension to our Github for authentication.&lt;br&gt;
And keep the private key private.&lt;br&gt;
After creating a file, we have to type a secure passphrase at the next prompt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Enter passphrase &lt;span class="o"&gt;(&lt;/span&gt;empty &lt;span class="k"&gt;for &lt;/span&gt;no passphrase&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;Type a passphrase]
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Enter same passphrase again: &lt;span class="o"&gt;[&lt;/span&gt;Type passphrase again]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will be used for authenticating our Github actions during push/pull and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Adding our SSH key to the SSH-agent
&lt;/h3&gt;

&lt;p&gt;Before adding SSH key to SSH-agent let’s make sure our agent is up and running.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;blank@phoenix: ~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;ssh-agent &lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;”
Agent pid {processId}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will get the process id of the agent on success. Now we can add your SSH key to SSH-agent&lt;/p&gt;

&lt;p&gt;We can add SSH file with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;blank@phoenix: ~&lt;span class="nv"&gt;$ &lt;/span&gt;ssh-add path_to_private_ssh_key_file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;blank@phoenix: ~&lt;span class="nv"&gt;$ &lt;/span&gt;ssh-add ~/.ssh/id_rsa_personal
blank@phoenix: ~&lt;span class="nv"&gt;$ &lt;/span&gt;ssh-add ~/.ssh/id_rsa_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will get a prompt to enter our passphrase. Let’s enter the passphrase and we’re good to go. &lt;br&gt;
We can add multiple SSH files, we just have to make sure the file name are unique and don’t overwrite your SSH key and we add correct public key to our Github account.&lt;br&gt;
Since we have multiple SSH key, we have to map our SSH keys with our  Github account.&lt;br&gt;
If we don’t map them then git will look for the default file while accessing our repo so it won’t be easy to use multiple Github account from SSH.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Let’s create a config to map our SSH key with Github
&lt;/h3&gt;

&lt;p&gt;Now let’s create a &lt;code&gt;config&lt;/code&gt; file inside our &lt;code&gt;.ssh&lt;/code&gt; folder with our private and public keys.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Personal account
Host github.com-personal
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_personal

# Work account
Host github.com-work
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Host github.com-personal&lt;/code&gt;  This is just an alias for our host. This alias name will be used in place of the actual hostname &lt;code&gt;github.com&lt;/code&gt; when connecting with Github repo.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;HostName github.com&lt;/code&gt;: This is the actual host name of the remote host which is (&lt;code&gt;github.com&lt;/code&gt; )in our case. SSH looks for this host to connect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;User git&lt;/code&gt;&lt;/strong&gt;: This line specifies the username that SSH should use when connecting to the remote host. In most cases with GitHub, the username is &lt;strong&gt;&lt;code&gt;git&lt;/code&gt;&lt;/strong&gt;. Github expects &lt;code&gt;git&lt;/code&gt; to be there sorta thing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;IdentityFile ~/.ssh/our_ssh_key&lt;/code&gt;&lt;/strong&gt;: This line specifies the path to the SSH private key file (&lt;strong&gt;&lt;code&gt;id_rsa_personal&lt;/code&gt;&lt;/strong&gt;) that should be used when connecting to the remote host using the defined alias (&lt;strong&gt;&lt;code&gt;github.com-personal&lt;/code&gt;&lt;/strong&gt;). This allows us to use a specific SSH key for specific Github account. We can map different SSH key to different account.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Add public SSH to Github
&lt;/h3&gt;

&lt;p&gt;We have created a public and private SSH and added them to our SSH-agent. We also created a config file where we config which &lt;code&gt;Host&lt;/code&gt; (alias for our Github account) will use which &lt;code&gt;IdentifyFile&lt;/code&gt;. Now we need to add our public SSH key to our Github account.&lt;/p&gt;

&lt;p&gt;To add public SSH key to our Github go to Github → &lt;strong&gt;Settings&lt;/strong&gt; → under &lt;strong&gt;Access&lt;/strong&gt; you’ll find &lt;strong&gt;SSH and GPG Keys.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click  &lt;strong&gt;New SSH Key&lt;/strong&gt; button and add our SSH key from &lt;code&gt;dentity-file.pub&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;We can read more on this here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account"&gt;Adding a new SSH key to your GitHub account - GitHub Docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We just have to make sure we add our personal SSH key to our personal Github account and work SSH key to our work account and so on. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now let’s update Remote URL in our git repositories
By default the Github repositories’ SSH origin will be in the format &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;git@github.com:github-username/repository-name.git&lt;/code&gt;  | (&lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;/haruBlank00/baka-commerce.git)&lt;br&gt;
We have to update our repositories URL so that git understands which SSH key to use for which Github repo.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For existing repositories, we have to update the remote URLs to use the configured aliases: as &lt;code&gt;git@Host:username/repository.git&lt;/code&gt; &lt;code&gt;Host&lt;/code&gt; is the config identifier we have on our config file (&lt;code&gt;github.com-personal&lt;/code&gt;, &lt;code&gt;github.com-work&lt;/code&gt; and &lt;code&gt;username/repository.git&lt;/code&gt; is the actual git repo.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;blank@phoenix: ~&lt;span class="nv"&gt;$ &lt;/span&gt;git remote set-url origin git@github.com-personal:username/repository.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have to replace &lt;strong&gt;&lt;code&gt;username/repository&lt;/code&gt;&lt;/strong&gt; with our actual GitHub username and repository name.&lt;/p&gt;

&lt;p&gt;For our previous URL , it will be &lt;code&gt;git@github.com-personal:haruBlank00/baka-commerce.git&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If we want to clone this repo then we can just change the default URL to this format and clone.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;blank@phoenix: ~&lt;span class="nv"&gt;$ &lt;/span&gt;git clone git@Host/username/repository.git
blank@phoenix: ~&lt;span class="nv"&gt;$ &lt;/span&gt;git clone git@github.com-personal:haruBlank00/baka-commerce.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way we can generate and add manage multiple SSH key in our system 😀&lt;br&gt;
If you have any queries or want add something. Please leave a comment 💭.&lt;br&gt;
Have a great day. 💞&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>tutorial</category>
      <category>software</category>
    </item>
    <item>
      <title>I don't know what to do anymore</title>
      <dc:creator>Haru Blank</dc:creator>
      <pubDate>Sun, 17 Mar 2024 05:10:54 +0000</pubDate>
      <link>https://dev.to/harublank00/i-dont-know-what-to-do-anymore-2iba</link>
      <guid>https://dev.to/harublank00/i-dont-know-what-to-do-anymore-2iba</guid>
      <description>&lt;p&gt;I have been in the industry for 2+ years &lt;br&gt;
I have been learning coding before way before that &lt;br&gt;
Everything feels so overwhelming &lt;br&gt;
Learning new tools seems to overwhelming&lt;br&gt;
So many techs to learn&lt;br&gt;
and basics are weak &lt;br&gt;
Neither good at front nor and back&lt;br&gt;
I wanna become a better developer &lt;br&gt;
Build good product&lt;br&gt;
but i got skill issue&lt;br&gt;
idea issue &lt;br&gt;
i end up getting paralysis and doing nothing&lt;br&gt;
:(&lt;br&gt;
I see less skillful people earning more &lt;br&gt;
and I am just always thinking I am not good enough &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
