<?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: Magesh Babu</title>
    <description>The latest articles on DEV Community by Magesh Babu (@mage1k99).</description>
    <link>https://dev.to/mage1k99</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%2F402402%2F26df81a8-967f-4775-80ad-bfe559197af8.jpeg</url>
      <title>DEV Community: Magesh Babu</title>
      <link>https://dev.to/mage1k99</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mage1k99"/>
    <language>en</language>
    <item>
      <title>How to access your server anywhere without SSH</title>
      <dc:creator>Magesh Babu</dc:creator>
      <pubDate>Tue, 23 Nov 2021 08:41:07 +0000</pubDate>
      <link>https://dev.to/mage1k99/how-to-access-your-server-anywhere-without-ssh-fdf</link>
      <guid>https://dev.to/mage1k99/how-to-access-your-server-anywhere-without-ssh-fdf</guid>
      <description>&lt;p&gt;How to access your server anywhere without SSH.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You want to have temporary access of your server from a remote location&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You don't want to authorize a key to connect via ssh&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;OK now lets get into the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;root access&lt;/li&gt;
&lt;li&gt;A Linux machine with ports &lt;code&gt;3023&lt;/code&gt;, &lt;code&gt;3024&lt;/code&gt;, &lt;code&gt;3025&lt;/code&gt;, and &lt;code&gt;443&lt;/code&gt; open&lt;/li&gt;
&lt;li&gt;A registered domain name&lt;/li&gt;
&lt;li&gt;An SSH client like OpenSSH.&lt;/li&gt;
&lt;li&gt;2FA App&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Download and installing Teleport
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;visit &lt;a href="https://goteleport.com/" rel="noopener noreferrer"&gt;Teleport website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp9m9awg80idrnmxd19g3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp9m9awg80idrnmxd19g3.png" alt="Teleport website" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click getting started, and select the community edition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8um75kv45ta5kbycr91g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8um75kv45ta5kbycr91g.png" alt="Choosing community edition" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select acconding your platform, for me its Ubuntu 18.04 LTS, so I select the &lt;code&gt;Linux 64-bit DEB&lt;/code&gt; version 8.0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6y4tky9h8wvyz35xu0ls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6y4tky9h8wvyz35xu0ls.png" alt="Copy the link to download" width="760" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now login to your server via ssh, and download teleport using wget by running &lt;code&gt;wget https://get.gravitational.com/teleport_8.0.0_amd64.deb&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5pyab9ggxbwor905h7m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5pyab9ggxbwor905h7m.png" alt="After downloading teleport using teleport" width="800" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install the deb package by &lt;code&gt;sudo apt install ./teleport_8.0.0_amd64.deb&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjb1x0n0lg12643gi12q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjb1x0n0lg12643gi12q.png" alt="Installing Deb" width="694" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure your domain for SSL certificate
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;teleport configure &lt;span class="nt"&gt;--acme&lt;/span&gt; &lt;span class="nt"&gt;--acme-email&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-email@example.com &lt;span class="nt"&gt;--cluster-name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;tele.example.com &lt;span class="nt"&gt;-o&lt;/span&gt; /etc/teleport.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Note if you already have reverse proxy servers running at port &lt;code&gt;443&lt;/code&gt; you needed to edit it and change the port (/etc/teleport.yaml) [Included at last step].
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Now start the teleport &lt;code&gt;sudo systemctl start teleport.service&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add user with&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tctl &lt;span class="nb"&gt;users &lt;/span&gt;add teleport-admin &lt;span class="nt"&gt;--roles&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;editor,access &lt;span class="nt"&gt;--logins&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;root,ubuntu,ec2-user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It will give you a url to access the teleport&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow the steps in the webpage to activate&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  For users with port address being used by other process
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open the config file in &lt;code&gt;/etc/teleport.yaml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Go to the line where
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;web_listen_addr&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0:443&lt;/span&gt;
&lt;span class="na"&gt;public_addr&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;tele.example.com:443&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Change the port address there&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;reload teleport service by &lt;code&gt;sudo systemctl restart teleport.service&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;for more about &lt;a href="https://goteleport.com/docs/getting-started/linux-server/" rel="noopener noreferrer"&gt;installation documentation checkout&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ssh</category>
      <category>tutorial</category>
      <category>writing</category>
    </item>
    <item>
      <title>How to run or host WordPress with Caddy2 server</title>
      <dc:creator>Magesh Babu</dc:creator>
      <pubDate>Mon, 05 Jul 2021 14:41:23 +0000</pubDate>
      <link>https://dev.to/mage1k99/how-to-run-or-host-wordpress-with-caddy2-server-48o8</link>
      <guid>https://dev.to/mage1k99/how-to-run-or-host-wordpress-with-caddy2-server-48o8</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PHP Version       : 8.0
WordPress version : 5.7.2
Caddy version     : v2.4.3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Installing Dependencies
&lt;/h2&gt;

&lt;p&gt;To install WordPress, you must required to have PHP and MySQL or mariaDB&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing PHP
&lt;/h3&gt;

&lt;p&gt;This is for Ubuntu/Debian Distro.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sudo apt update&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo apt install php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If the above command returns package not found or similar error do this step else go to next step, then you need to add the PPA, you can add them by &lt;code&gt;sudo add-apt-repository ppa:ondrej/php;sudo apt update&lt;/code&gt; and now repeat the above step&lt;/li&gt;
&lt;li&gt;Now remove the apache2 server which is installed when installing PHP, by &lt;code&gt;sudo apt purge apache2*&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check the PHP Version by running &lt;code&gt;php -v&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installing MYSQL Database
&lt;/h3&gt;

&lt;p&gt;If you don't have MYSQL installed refer this &lt;a href="https://digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04" rel="noopener noreferrer"&gt;blog by digitalocean&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Downloading Wordpress
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the required directory, where do you want to save wordpress. here I use &lt;code&gt;/home/illuminate/php_sites&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Download the latest Wordpress by &lt;code&gt;wget https://wordpress.org/latest.tar.gz&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;extract the tar file by &lt;code&gt;tar -xzvf latest.tar.gz&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Delete the tar file after extraction completed&lt;/li&gt;
&lt;li&gt;go to the &lt;code&gt;wordpress/&lt;/code&gt; by &lt;code&gt;cd wordpress&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating DB for Wordpress
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you have successfully installed mysql, create a seperate user and db for wordpress&lt;/li&gt;
&lt;li&gt;Login to mysql by &lt;code&gt;mysql -u adminusername -p&lt;/code&gt; and now Enter the password&lt;/li&gt;
&lt;li&gt;replace the &lt;code&gt;databasename&lt;/code&gt; with the database name you want.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;databasename&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;use&lt;/span&gt; &lt;span class="n"&gt;databasename&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;USER&lt;/span&gt; &lt;span class="s1"&gt;'username'&lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="s1"&gt;'localhost'&lt;/span&gt; &lt;span class="n"&gt;IDENTIFIED&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="s1"&gt;'password'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;GRANT&lt;/span&gt; &lt;span class="k"&gt;ALL&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="s1"&gt;'username'&lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="s1"&gt;'localhost'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;flush&lt;/span&gt; &lt;span class="k"&gt;privileges&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;After the above steps successful, exit the mysql by pressing &lt;code&gt;ctrl+d&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Editing the Caddyfile
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Now add the entry to serve Wordpress
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;example.com {
    root * /home/illuminate/php_sites/wordpress
    php_fastcgi unix//run/php/php8.0-fpm.sock
    file_server
    encode gzip

    @disallowed {
        path /xmlrpc.php
        path *.sql
        path /wp-content/uploads/*.php
    }

    rewrite @disallowed '/index.php'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now reload the caddy server.&lt;/li&gt;
&lt;li&gt;and its done.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configuring Wordpress
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When you visit the domain configured in caddyfile, it will ask to configure if not configured.&lt;/li&gt;
&lt;li&gt;Enter the database credentials as we created.&lt;/li&gt;
&lt;li&gt;If it fails to write &lt;code&gt;wp-config.php&lt;/code&gt; file, then copy the configuration from web&lt;/li&gt;
&lt;li&gt;create a &lt;code&gt;wp-config.php&lt;/code&gt; file inside the directory where &lt;code&gt;wp-content&lt;/code&gt;, &lt;code&gt;wp-admin&lt;/code&gt;, &lt;code&gt;wp-content&lt;/code&gt; are present, for me its &lt;code&gt;/home/illuminate/php_sites/wordpress&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;paste the contents copied into the file, save and begin the installation.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>wordpress</category>
      <category>caddy2</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to Sign Commits in Git for Fish Shell</title>
      <dc:creator>Magesh Babu</dc:creator>
      <pubDate>Mon, 28 Dec 2020 21:04:08 +0000</pubDate>
      <link>https://dev.to/mage1k99/how-to-sign-commits-in-git-for-fish-shell-4o5i</link>
      <guid>https://dev.to/mage1k99/how-to-sign-commits-in-git-for-fish-shell-4o5i</guid>
      <description>&lt;p&gt;Hi there 👋!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisite:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GPG Installed&lt;/li&gt;
&lt;li&gt;Git Installed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Fish Shell
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Generating GPG Key&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;gpg --full-gen-key&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2jrnwa2g06z8stp7hbds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2jrnwa2g06z8stp7hbds.png" alt="Alt Text" width="800" height="807"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After generation of your GPG Key, run &lt;code&gt;gpg --list-secret-keys --keyid-format LONG&lt;/code&gt; to list your GPG Keys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh7ef8cgtfidgzf23h9v6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh7ef8cgtfidgzf23h9v6.png" alt="Alt Text" width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now Copy The ID like this&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr13e9br1f1zt39493y73.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr13e9br1f1zt39493y73.png" alt="Alt Text" width="800" height="161"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tell Git about your signing Key, make sure that you have configured git name and email&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;git config --global user.signingkey ED267DF4249ACCC3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global gpg.program (which gpg)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git config --global commit.gpgsign true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here &lt;code&gt;ED267DF4249ACCC3&lt;/code&gt; is my GPG key ID, replace it with yours.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now set The value of GPG_TTY value.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;set -gx GPG_TTY (tty)&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Add the above line to your config.fish file which is located in $HOME/.config/fish/config.fish&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now let us test if our GPG works by running&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;echo "hello" | gpg --clearsign&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feoo0vdhqsjb30pn05mfr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feoo0vdhqsjb30pn05mfr.png" alt="SIGNED_ECHO" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If it prompts password for using your GPG key (if any) and generates a sign like above, then your GPG Sign is configured successfully to sign commits&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To sign a commit &lt;code&gt;git commit -S -m "your message"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu7d92addsywgs0relgd6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu7d92addsywgs0relgd6.png" alt="Alt Text" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-You can check for Sign by running &lt;code&gt;git log --show-signature -1&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;To get verified, you must add your GPG Key to your github account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Export the GPG Public by running &lt;code&gt;gpg --armor --export ED267DF4249ACCC3&lt;/code&gt; remember to replace ED267DF4249ACCC3&lt;br&gt;
with your own.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsy9kvft7em7agpr6i34c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsy9kvft7em7agpr6i34c.png" alt="Alt Text" width="790" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visit &lt;a href="https://github.com" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, login and click your profile icon, select settings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faz4uqopt9lvojldcneau.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faz4uqopt9lvojldcneau.png" alt="Alt Text" width="212" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the user settings sidebar, click SSH and GPG keys.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdocs.github.com%2Fassets%2Fimages%2Fhelp%2Fsettings%2Fsettings-sidebar-ssh-keys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdocs.github.com%2Fassets%2Fimages%2Fhelp%2Fsettings%2Fsettings-sidebar-ssh-keys.png" alt="USEE" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Select SSH And GPG Keys&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the add GPG key button&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdocs.github.com%2Fassets%2Fimages%2Fhelp%2Fsettings%2Fgpg-add-gpg-key.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdocs.github.com%2Fassets%2Fimages%2Fhelp%2Fsettings%2Fgpg-add-gpg-key.png" alt="ADD_GPG_KEY" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Paste the GPG that we have copied.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdocs.github.com%2Fassets%2Fimages%2Fhelp%2Fsettings%2Fgpg-key-paste.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdocs.github.com%2Fassets%2Fimages%2Fhelp%2Fsettings%2Fgpg-key-paste.png" alt="PASTE" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the add GPG Key button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now your commits that are signed with it are shown as verified in GitHub 😃&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Will Link post for windows CMD and Bash below after ASAP! 🤓&lt;/p&gt;

&lt;p&gt;Thanks for reading the Post!, Have a nice day!! 😄&lt;/p&gt;

</description>
      <category>git</category>
      <category>gpg</category>
      <category>fish</category>
      <category>tips</category>
    </item>
  </channel>
</rss>
