<?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: hαršh vαᎥrαgᎥ 🐼</title>
    <description>The latest articles on DEV Community by hαršh vαᎥrαgᎥ 🐼 (@harshvairagi).</description>
    <link>https://dev.to/harshvairagi</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%2F2048877%2Fa8e639e0-35ec-49ed-9077-aaa3f1571b52.jpg</url>
      <title>DEV Community: hαršh vαᎥrαgᎥ 🐼</title>
      <link>https://dev.to/harshvairagi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/harshvairagi"/>
    <language>en</language>
    <item>
      <title>Store git credentials permanently!</title>
      <dc:creator>hαršh vαᎥrαgᎥ 🐼</dc:creator>
      <pubDate>Fri, 26 Sep 2025 18:07:20 +0000</pubDate>
      <link>https://dev.to/harshvairagi/store-git-credentials-permanently-2jfc</link>
      <guid>https://dev.to/harshvairagi/store-git-credentials-permanently-2jfc</guid>
      <description>&lt;p&gt;Git continually prompts for your user credentials when you push, it is probably because your credentials are either not being cached or not being correctly saved?&lt;/p&gt;

&lt;p&gt;Here are some commands to fix the situation:&lt;/p&gt;

&lt;p&gt;You can set up your credentials to be stored permanently using the &lt;code&gt;store&lt;/code&gt; helper(Note that storing them in plain text is rather insecure).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper store
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After executing the commands above, Git will store your credentials in the &lt;code&gt;~/.git-credentials&lt;/code&gt; file the first time you enter them. Subsequently, you should now be able to stop Git repeatedly asking for your credentials.&lt;/p&gt;

</description>
      <category>git</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Expose WSL2 to local network permanently.</title>
      <dc:creator>hαršh vαᎥrαgᎥ 🐼</dc:creator>
      <pubDate>Fri, 26 Sep 2025 18:01:10 +0000</pubDate>
      <link>https://dev.to/harshvairagi/expose-wsl2-to-local-network-permanently-hfa</link>
      <guid>https://dev.to/harshvairagi/expose-wsl2-to-local-network-permanently-hfa</guid>
      <description>&lt;p&gt;You can expose WSL2 to your local network permanently using &lt;code&gt;mirrored&lt;/code&gt; networking mode.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite
&lt;/h2&gt;

&lt;p&gt;You must have to remind these conditions in mind before proceed with the guide.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ You must have atleast &lt;code&gt;Windows 11 22H2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;✅ Administration access of your machine.&lt;/li&gt;
&lt;li&gt;✅ Absolutly you must have &lt;code&gt;WSL2&lt;/code&gt; configured.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Recommendation
&lt;/h2&gt;

&lt;p&gt;This is completely optional but you create a restore point because we are goint to turn off &lt;code&gt;firewall&lt;/code&gt; for private or entire (all) networks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation
&lt;/h2&gt;

&lt;p&gt;Run the &lt;code&gt;Windows PowerShell&lt;/code&gt; as &lt;strong&gt;Administrator&lt;/strong&gt; and follow these steps accordingly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Edit &lt;code&gt;.wslconfig&lt;/code&gt; file using &lt;code&gt;notepad&lt;/code&gt;.
&lt;/h3&gt;

&lt;p&gt;Open or create the &lt;code&gt;.wslconfig&lt;/code&gt; file located in your &lt;em&gt;Windows user profile&lt;/em&gt; folder. You can do this by running this command in &lt;code&gt;Windows PowerShell&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;notepad &lt;span class="nv"&gt;$env&lt;/span&gt;:USERPROFILE&lt;span class="se"&gt;\.&lt;/span&gt;wslconfig
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Add the mirrored mode setting
&lt;/h3&gt;

&lt;p&gt;Add the following lines to the &lt;code&gt;.wslconfig&lt;/code&gt; file and save it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[wsl2]&lt;/span&gt;
&lt;span class="py"&gt;networkingMode&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;mirrored&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Shut down and restart &lt;code&gt;WSL2&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Shut down all &lt;code&gt;WSL2&lt;/code&gt; instances to apply the changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wsl &lt;span class="nt"&gt;--shutdown&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Configure the Hyper-V firewall
&lt;/h3&gt;

&lt;p&gt;The final step is to allow inbound connections through the Hyper-V firewall that WSL2 uses. Open &lt;code&gt;Windows PowerShell&lt;/code&gt; as an &lt;code&gt;Administrator&lt;/code&gt; and run one of the following commands:&lt;/p&gt;

&lt;h4&gt;
  
  
  For private networks (safe):
&lt;/h4&gt;

&lt;p&gt;This turn off &lt;code&gt;firewall&lt;/code&gt; for private networks only.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;New-NetFirewallHyperVRule &lt;span class="nt"&gt;-DisplayName&lt;/span&gt; &lt;span class="s1"&gt;'WSL Private Inbound Rule'&lt;/span&gt; &lt;span class="nt"&gt;-Profiles&lt;/span&gt; Private &lt;span class="nt"&gt;-Direction&lt;/span&gt; Inbound &lt;span class="nt"&gt;-Action&lt;/span&gt; Allow &lt;span class="nt"&gt;-VMCreatorId&lt;/span&gt; &lt;span class="o"&gt;((&lt;/span&gt;Get-NetFirewallHyperVVMCreator&lt;span class="o"&gt;)&lt;/span&gt;.VMCreatorId&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  To disable the firewall entirely (easiest but less secure):
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Set-NetFirewallHyperVVMSetting &lt;span class="nt"&gt;-Name&lt;/span&gt; &lt;span class="o"&gt;((&lt;/span&gt;Get-NetFirewallHyperVVMCreator&lt;span class="o"&gt;)&lt;/span&gt;.VMCreatorId&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;-Enabled&lt;/span&gt; False
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congrats, your &lt;code&gt;WSL2&lt;/code&gt; services will be directly accessible from other devices on the LAN using your machine's IP address.&lt;/p&gt;

&lt;h2&gt;
  
  
  Support
&lt;/h2&gt;

&lt;p&gt;If you have any question about this you can follow and ask me on &lt;a href="https://www.linkedin.com/in/harshvairagi/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>wsl2</category>
      <category>windows</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
