<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by karthi on Medium]]></title>
        <description><![CDATA[Stories by karthi on Medium]]></description>
        <link>https://medium.com/@karthi32.mail?source=rss-185ac5f88fea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kMhLhnfUvixZr1IMrr54SQ.jpeg</url>
            <title>Stories by karthi on Medium</title>
            <link>https://medium.com/@karthi32.mail?source=rss-185ac5f88fea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:55:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@karthi32.mail/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using Multiple Github Accounts for Multiple Github Projects in same System without SSH Keys]]></title>
            <link>https://medium.com/@karthi32.mail/using-multiple-github-accounts-for-multiple-github-projects-in-same-system-without-ssh-keys-af8afa35f8d7?source=rss-185ac5f88fea------2</link>
            <guid isPermaLink="false">https://medium.com/p/af8afa35f8d7</guid>
            <category><![CDATA[configuration-management]]></category>
            <category><![CDATA[account]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[karthi]]></dc:creator>
            <pubDate>Tue, 20 May 2025 09:29:05 GMT</pubDate>
            <atom:updated>2025-05-20T09:29:05.508Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>GitHub</strong> is one of the most popular tools used by programmers and developers for source version control of their software application or projects.</p><p>GitHub allows Programmers, Software Developers working in an Organisation and Freelancers to change, adapt and improve software from its public repositories for free. Each public and private repository contains all of a project’s files, as well as each file’s revision history. Repositories can have multiple collaborators and can be either public or private.</p><p>Developers working in an Organisation or Freelancers often require juggling between multiple github accounts from their local system. To achieve this, the most common way is to use SSH keys based git operations. I was searching for an alternate way to achieve this without using SSH keys since I use Github PAT primarily. And I found the following method helped me with this.</p><p>Generate a PAT token from Github UI with all required read and write permissions to operate on the origin repository.</p><p>Every git repo cloned contains .git directory in it which contains all information required for version control.</p><p>Under the .git directory, find the config file and update the file with username and email config of appropriate Github account. Also add the PAT in the github url as mentioned in the following sample config gist.</p><pre>cat ./.git/config <br>...<br>[remote &quot;origin&quot;]<br>        url = https://&lt;github personal access token&gt;@github.com/org/repo<br>        fetch = +refs/heads/*:refs/remotes/origin/*<br>[user]<br>        name = &lt;github user name&gt;<br>        email = &lt;github user email&gt;<br>...</pre><p>This way we can configure and use different Github accounts for different projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af8afa35f8d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring Cloud Config Server Encryption and Decryption using Git Repository]]></title>
            <link>https://medium.com/@karthi32.mail/spring-cloud-config-server-encryption-and-decryption-using-git-repository-d8d1a7a1e6eb?source=rss-185ac5f88fea------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8d1a7a1e6eb</guid>
            <category><![CDATA[config-server]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[spring-cloud-config]]></category>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[decryption]]></category>
            <dc:creator><![CDATA[karthi]]></dc:creator>
            <pubDate>Wed, 26 Jan 2022 08:28:03 GMT</pubDate>
            <atom:updated>2022-01-27T03:22:02.266Z</atom:updated>
            <content:encoded><![CDATA[<p>This story tells about how we can use Config Server project in Spring Cloud to perform both encryption and decryption. Whenever we hear these cryptographic terms (encryption or decryption), the first thing that pops up to our mind is whether it is Symmetric or Asymmetric Cryptography.</p><p>We can use Spring Cloud’s Config Server project to preform both Symmetric or Asymmetric Cryptography without any much effort and with few configurations.</p><p>We will use local git as a backend repository for fetching Configuration file for our Spring Application.</p><p>First of all, for Config Server application, we can directly download it from <a href="https://start.spring.io/">Spring Initializr</a> with <strong><em>Config Server</em></strong> dependency.</p><p>Now we have to set up local git repository as backend repository for our spring configuration files. For that,</p><ul><li>Create new Directory in your File System and use <strong><em>git init</em></strong><em> </em>command to initialise a git repository</li></ul><p>Now lets configure the downloaded Spring Boot project with this local git as repository for configuration files. For doing so,</p><ul><li>First add <strong><em>@EnableConfigServer</em></strong> annotation in Spring Boot Application Class.</li><li>Then add the <strong><em>spring.cloud.config.server.git.uri </em></strong>property in the application properties file with config repo directory.</li></ul><pre>server.port = 8888<br><br># Set path to Local Git Repository<br>spring.cloud.config.server.git.uri</pre><h3>Symmetric Cryptography :</h3><p>For encryption and decryption by Symmetric Key Cryptography, set the property <strong><em>encrypt.key </em></strong>in application properties file on classpath. Internally Config server will pick this environment variable and uses it for Symmetric Cryptography.</p><pre># Setting the key for Symmetric Encryption and Decryption<br>encrypt.key</pre><p>Config Server exposes 2 endpoints with path <strong><em>/encrypt </em></strong>and<strong><em> / decrypt </em></strong>for encryption and decryption of data respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*is7_vF9vlI8bF8ZL1YdAjA.jpeg" /><figcaption>Properties set for Symmetric Cryptography</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*5z7o3n364QCcr_pjQ0BxFw.jpeg" /><figcaption>Symmetric Encryption</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*3m7xGqdTa6z0_PB7SSY6Jw.jpeg" /><figcaption>Symmetric Decryption</figcaption></figure><h3>Asymmetric Cryptography :</h3><p>For Asymmetric Cryptography, we need private and public key pairs to perform encryption and decryption. We can use keytool program to generate key-pairs for asymmetric cryptography.</p><p><strong><em>keytool</em></strong><em> </em>is a command line utility similar to <strong><em>openSSL</em></strong><em> </em>through which, we can create cryptographic key pairs, X.509 certificate chains and Self-Signed Certificates. It comes along with JDK. Checkout for more details about keytool <a href="https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html">here</a>.</p><p>First lets create cryptographic key pair for performing asymmetric encryption and decryption.</p><p>We can use the following command to generate RSA keypairs in jks format. This will generate a private and public key pair in mentioned keystore file.</p><p>Note : From Java-11, we have to use same value for both keypass and storepass</p><pre>keytool -genkeypair \<br>  -keyalg RSA \<br>  -dname &quot;cn=Config-Serv, ou=Java, o=Spring, c=US&quot; \<br>  -alias configserv \<br>  -keypass nopass \<br>  -keystore simple.jks \<br>  -storepass nopass</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fjF178-BGQHHRT0tPt3mZg.png" /><figcaption>Generating keystore file in jks format</figcaption></figure><p>Make sure that this file is available in Classpath before you run your application. Then we have to set the following properties in application.properties file for performing asymmetric encryption and decryption.</p><pre># Path of Key-Pairs to be used. (Recommended: Use Classpath)<br>encrypt.keyStore.location </pre><pre># Represents the password to read jks file (keypass)<br>encrypt.keyStore.password</pre><pre># Represents the password to read jks file (storepass)<br># From Java-11 keystore password and secret should be same.<br># It is optional to specify. When not given keystore password is used as secret by default.<br>encrypt.keyStore.secret</pre><pre># Value of Alias used in jks generation<br>encrypt.keyStore.alias</pre><pre># Format of keystore (Default: jks)<br>encrypt.keyStore.type</pre><p>Once these properties are set, we can start running our Application and it uses the key pairs from jks file and performs encryption and decryption.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GmD9uduYv8e0QXtxseYY3w.png" /><figcaption>Properties Set for Asymmetric Encryption and Decryption</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ho2elf7BtZaW_mcgbPcUcA.png" /><figcaption>Asymmetric Encryption</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*psAUgukQNXfvMdO0yYG_fw.png" /><figcaption>Asymmetric Decryption</figcaption></figure><p>This is how we can perform both Symmetric and Asymmetric, Encryption and Decryption using Spring Cloud Config Server. Checkout the <a href="https://docs.spring.io/spring-cloud-config/docs/current/reference/html/">Config Server documentation</a> for knowing more interesting stuffs about it.</p><p>Happy Learning :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8d1a7a1e6eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>