<?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: Tegar Sabila</title>
    <description>The latest articles on DEV Community by Tegar Sabila (@tegarsabila).</description>
    <link>https://dev.to/tegarsabila</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%2F852599%2F978b7f98-79ce-4d47-8911-e8cb4c7a23e9.jpeg</url>
      <title>DEV Community: Tegar Sabila</title>
      <link>https://dev.to/tegarsabila</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tegarsabila"/>
    <language>en</language>
    <item>
      <title>How to Upload Project to Github Using Termux, SSH Method.</title>
      <dc:creator>Tegar Sabila</dc:creator>
      <pubDate>Mon, 25 Apr 2022 02:57:15 +0000</pubDate>
      <link>https://dev.to/tegarsabila/how-to-upload-project-using-termux-ssh-method-561a</link>
      <guid>https://dev.to/tegarsabila/how-to-upload-project-using-termux-ssh-method-561a</guid>
      <description>&lt;h1&gt;
  
  
  upload project using termux
&lt;/h1&gt;

&lt;p&gt;this is tutorial uploading files using termux using ssh method.&lt;/p&gt;

&lt;p&gt;Langkah awal adalah menjalankan aplikasi termux terlebih dahulu&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first step is to run the termux application first&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ketika sudah, kita akan menginstal beberapa package yang diperlukan untuk melakukan push github menggunakan metode ssh&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When it's done, we'll install some of the packages needed to push github using the ssh method
&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="nv"&gt;$ &lt;/span&gt;pkg &lt;span class="nb"&gt;install &lt;/span&gt;openssh &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pkg &lt;span class="nb"&gt;install &lt;/span&gt;git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GKxr6c0W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fy59tkm015o29i6m2byg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GKxr6c0W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fy59tkm015o29i6m2byg.png" alt="Image description" width="880" height="869"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ketika  sudah menginstall openssh dan git, langkah selanjutnya adalah membuat ssh-keygen terlebih dahulu&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you have installed openssh and git, the next step is to create an ssh-keygen first
&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="nv"&gt;$ &lt;/span&gt;ssh-keygen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;kemudian akan di minta untuk mengisi beberapa opsi, untuk enter file in which to save the key, kalian langsung enter saja. Lalu diminta untuk memasukan  passphrase, Kalian isi bebas. Tapi perlu di ingat passphrase ini penting untuk di pakai jika kalian meremote github kalian&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Then you will be asked to fill in several options, to enter file in which to save the key, you just enter. Then asked to enter a passphrase, you are free to fill in. But keep in mind that this passphrase is important to use if you remotely use your github&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AaxUTNQQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ccriyk9w90zfkvqoiwq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AaxUTNQQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ccriyk9w90zfkvqoiwq.png" alt="Image description" width="880" height="1016"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;jika ssh-keygen sudah berhasil dibuat, kalian masuk ke direktori $HOME/.ssh, lalu ssh key public kalian ada disitu. Gunakan perintah cat untuk salin ssh key nya.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if the ssh-keygen has been successfully created, you go to the $HOME/.ssh directory, then your public ssh key is there. Use the cat command to copy the ssh key.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mcSf6iNW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6cyirsf55ur21wo0r5yo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mcSf6iNW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6cyirsf55ur21wo0r5yo.png" alt="Image description" width="880" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lalu kalian salin ssh key nya&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then you copy the ssh key&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3_Z5x_Eb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f25yvs0wxqad3d7b5pwf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3_Z5x_Eb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f25yvs0wxqad3d7b5pwf.png" alt="Image description" width="880" height="623"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;selanjutnya kembali lagi ke aplikasi termux kalian dan jalankan perintah "ssh -T &lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;"&lt;br&gt;
Jika sudah lalu masukan passphrase yang sudah kalian buat.&lt;br&gt;
Lalu enter, jika berhasil maka akan tampil username github kalian.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then go back to your termux application and run the command "ssh -T &lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;" If so, then enter the passphrase that you have created. Then enter, if successful, your github username will appear.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;lalu setelah itu buka github kalian, selanjutnya ke menu settings lalu ke menu SSH and GPG Keys. Lalu klik new ssh, selanjutnya masukan key ssh kalian dan isi nama untuk ssh key kalian (bebas)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then after that open your github, then go to the settings menu then go to the SSH and GPG Keys menu. Then click new ssh, then enter your ssh key and fill in the name for your ssh key (free)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---C7CliJW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vaoc5xu0g3duu59n3qn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---C7CliJW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vaoc5xu0g3duu59n3qn.png" alt="Image description" width="880" height="805"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;jika sudah, kalian add ssh key. Dan sini github kalian sudah terkoneksi ke terminal termux kalian. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if so, you add the ssh key. And here your github is connected to your termux terminal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;selanjutnya kembali lagi ke aplikasi termux kalian dan jalankan perintah "ssh -T &lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;"&lt;br&gt;
Jika sudah lalu masukan passphrase yang sudah kalian buat.&lt;br&gt;
Lalu enter, jika berhasil maka akan tampil username github kalian.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then go back to your termux application and run the command "ssh -T &lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;" If so, then enter the passphrase that you have created. Then enter, if successful, your github username will appear.
&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="nv"&gt;$ &lt;/span&gt;ssh &lt;span class="nt"&gt;-T&lt;/span&gt; git@github.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sekarang masuk ke tahap cara upload atau cara melakukan git push ke repository github kalian.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;now go to the stage of how to upload or how to do a git push to your github repository.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;langkah pertama, kalian masuk ke dalam folder yang akan di jadikan repository lokal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the first step, you go into the folder that will be used as a local repository.
&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="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;folder name&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lalu masukan perintah git init, untuk membuat konfigurasi git pada folder tersebut&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Then enter the git init command, to make a git configuration in that folder
&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="nv"&gt;$ &lt;/span&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;selanjutnya gunakan perintah git add (nama file) untuk menambahkan file yang akan di push&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then use the command git add (filename) to add files to be pushed
&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="nv"&gt;$ &lt;/span&gt;git add &lt;span class="o"&gt;(&lt;/span&gt;filename&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;atau untuk memilih semua file gunakan perintah&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;or to select all files use command
&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="nv"&gt;$ &lt;/span&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;selanjutnya buat commit nya&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then make the commit
&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="nv"&gt;$ &lt;/span&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"isi bebas"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;jika sudah buat branch nya&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if you have created a branch
&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="nv"&gt;$ &lt;/span&gt;git branch &lt;span class="nt"&gt;-M&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;your branch name&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;lalu remote repository kalian yang akan di jadikan tempat push file nya. Di sini kita menggunakan metode ssh, jadi kita akan membuat remote untuk ssh nya bukan untuk https&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then your remote repository that will be used as a place for the push file. Here we use the ssh method, so we will create a remote for ssh instead of https
&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="nv"&gt;$ &lt;/span&gt;git remote add &lt;span class="o"&gt;(&lt;/span&gt;remote name&lt;span class="o"&gt;)&lt;/span&gt; git@github.com:username/repository.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;contoh nya&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;example
&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="nv"&gt;$ &lt;/span&gt;git remote add origin git@github.com:tegarsabila/coba.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;lalu tinggal tahap push nya dengan menggunakan perintah git push, setelah enter akan diminta passphrase nya. Kalian masukan passphrase yang sudah kalian buat pada ssh-keygen sebelumnya&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then just push it by using the git push command, after entering it will ask for the passphrase. You enter the passphrase that you created in the previous ssh-keygen
&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="nv"&gt;$ &lt;/span&gt;git push &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;remote name&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;branch name&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;contoh nya&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;example
&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="nv"&gt;$ &lt;/span&gt;git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>github</category>
      <category>git</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
