<?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: Yamikani Chinamale</title>
    <description>The latest articles on DEV Community by Yamikani Chinamale (@ychinamale).</description>
    <link>https://dev.to/ychinamale</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%2F306680%2F4ff409fa-8af6-4cbb-a136-3b7948b3839d.jpg</url>
      <title>DEV Community: Yamikani Chinamale</title>
      <link>https://dev.to/ychinamale</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ychinamale"/>
    <language>en</language>
    <item>
      <title>Cloning a BitBucket Repo</title>
      <dc:creator>Yamikani Chinamale</dc:creator>
      <pubDate>Sat, 04 Jan 2020 14:22:56 +0000</pubDate>
      <link>https://dev.to/ychinamale/cloning-a-bitbucket-repo-3joj</link>
      <guid>https://dev.to/ychinamale/cloning-a-bitbucket-repo-3joj</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;I have a repo called 'my-new-repo' on BitBucket. I'm going to walk you through the steps I took in order to clone that repo onto my machine.&lt;/p&gt;

&lt;h4&gt;
  
  
  Steps
&lt;/h4&gt;

&lt;p&gt;First, set up an rsa key pair.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ssh-keygen
Generating public/private rsa key pair.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have to assign a name to the key. You could choose to leave this section blank to give it the default name; it will also get saved in the default location. I chose to name mine 'wsl-default' and saved it in my current working directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter file in which to save the key (/home/yamikani/.ssh/id_rsa): wsl-default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the purpose of this walkthrough, go ahead and leave the passphrase empty. The interaction should look something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in wsl-default.
Your public key has been saved in wsl-default.pub.
The key fingerprint is:
SHA256:TosAyiMu6LNeibN4K+aGxwIXGzWgLsuL5peR+isxbc4 yamikani@LAPTOP-HBMDC5G1
The key's randomart image is:
+---[RSA 2048]----+
|  ..             |
| .  o            |
|. .. .           |
|o.o.             |
|++.+o   S        |
|B+==.. + .       |
|*BBoo . o        |
|OBOE             |
|X&amp;amp;B+.            |
+----[SHA256]-----+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List your directory to make sure the key files are there. If you&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls
wsl-default wsl-default.pub
# use 'ls ~/.ssh' if you used the default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your public key file ends in '.pub', the other is your private key.&lt;/p&gt;

&lt;p&gt;Next, start the ssh-agent and add your private key to it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ eval `ssh-agent`
Agent pid 325

# adding private key to ssh-agent
$ ssh-add ./wsl-default
Identity added: ./wsl-default (./wsl-default)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use cat to show the content of your public key. Copy the content and &lt;strong&gt;add a new ssh key to your BitBucket account&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To do this, click on your avatar at the bottom left of the BitBucket dashboard. Then click on 'Bitbucket settings' and then navigate to 'SSH Keys' under the 'Security' section. Go ahead and click 'Add Key'. Give your key a distinct label and paste the contents you copied into the 'Key' section. Hit save.&lt;/p&gt;

&lt;p&gt;To confirm that you have correctly configured your Bitbucket for ssh, run the following command on the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ssh -T git@bitbucket.org
Warning: Permanently added the RSA host key for IP address '&amp;lt;ip_address&amp;gt;' to the list of known hosts.
logged in as yamikani
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;You can go ahead and clone our repository&lt;/strong&gt;. To do this, open your repository's page in BitBucket and click on 'Clone'. Make sure the dialog reads 'SSH' at the top right corner before you copy the clone command. Copy and paste the command in your terminal and run it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone git@bitbucket.org:yamikani/my-new-repo.git
Cloning into 'my-new-repo'...
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 12 (delta 1), reused 0 (delta 0)
Receiving objects: 100% (12/12), done.
Resolving deltas: 100% (1/1), done.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And there we have it.&lt;/p&gt;

</description>
      <category>bitbucket</category>
      <category>clone</category>
      <category>git</category>
      <category>ssh</category>
    </item>
    <item>
      <title>Setting Up Kotlin (Command Line)</title>
      <dc:creator>Yamikani Chinamale</dc:creator>
      <pubDate>Thu, 02 Jan 2020 21:53:38 +0000</pubDate>
      <link>https://dev.to/ychinamale/setting-up-kotlin-command-line-3o8e</link>
      <guid>https://dev.to/ychinamale/setting-up-kotlin-command-line-3o8e</guid>
      <description>&lt;h5&gt;
  
  
  Step 0: Set up JDK
&lt;/h5&gt;

&lt;p&gt;Kotlin requires that your JDK be set up. You can &lt;a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"&gt;head over to Oracle's official website&lt;/a&gt; to download and install JDK 8. &lt;/p&gt;

&lt;h5&gt;
  
  
  Step 1: Get Kotlin
&lt;/h5&gt;

&lt;p&gt;First we have to get the latest release of the Kotlin. &lt;a href="https://github.com/JetBrains/kotlin/releases/latest"&gt;Follow this link to download Kotlin's latest release.&lt;/a&gt; At the time of writing, the latest version was &lt;code&gt;v1.3.61&lt;/code&gt;. For Linux, download &lt;code&gt;kotlin-native-linux-1.3.61.tar.gz&lt;/code&gt; and place it in a directory of your choosing.&lt;/p&gt;

&lt;h5&gt;
  
  
  Step 2: Extract and Move Kotlin
&lt;/h5&gt;

&lt;p&gt;I prefer to have Kotlin set up in &lt;code&gt;/usr/local/bin/kotlin&lt;/code&gt;. Having it there and renamed to &lt;code&gt;'kotlin'&lt;/code&gt; instead of &lt;code&gt;'kotlin-native-linux-1.3.61'&lt;/code&gt; makes it easy for me to update Kotlin whenever a newer release is ready. We'll get to that in a minute. For now, open your terminal and follow these steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# first let's extract Kotlin
$ tar zxfv kotlin-native-linux-1.3.61.tar.gz

# next we'll rename the extracted folder
$ mv kotlin-native-linux-1.3.61/ kotlin

# then we'll create a kotlin directory in /usr/local/bin (requires admin rights)
$ mkdir /usr/local/bin/kotlin

# move kotlin
$ mv kotlin /usr/local/bin/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Step 3: Add Kotlin to PATH
&lt;/h5&gt;

&lt;p&gt;We have to add Kotlin to our PATH so we can access the compiler without having to write out the full path to our installation. Add the following lines to your &lt;code&gt;'~/.bashrc'&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export KOTLIN_HOME=/usr/local/bin/kotlin
export PATH=$PATH:$KOTLIN_HOME/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then make sure to run &lt;code&gt;source ~/.bashrc&lt;/code&gt; in order to access the Kotlin compiler in your current terminal session.&lt;/p&gt;

&lt;h5&gt;
  
  
  Step 4: Check Kotlin Installation
&lt;/h5&gt;

&lt;p&gt;Run the following command to confirm that you can access the Kotlin compiler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kotlinc -version
# should return something like =&amp;gt; info: kotlinc-native 1.3.60 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Step 5: Upgrading Kotlin
&lt;/h5&gt;

&lt;p&gt;To upgrade Kotlin, delete the contents of your current installation in &lt;code&gt;/usr/local/bin/kotlin&lt;/code&gt;. Download and extract a more recent version of Kotlin and move the extracted content into &lt;code&gt;/usr/local/bin/kotlin&lt;/code&gt; (a repeat of step 2). Voila!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>kotlin</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
