C Tech.inc

C Tech.inc

Share

26/07/2022

Facing Probleims with Termux
i got you covered
your termux to Git Hub to Git Working😁😁

What you need
The only things you need are a device running version 5.0 or newer of the Android platform and a GitHub account. That’s it.

Let’s make this happen.

Installing Termux
The first thing to do is install Termux. This is done from the Google Play Store, by following these steps:

Open the Google Play Store on your Android device.
Search for Termux.
Locate and tap the entry by Fredrik Fornwall.
Tap Install.
Allow the installation to complete.
Once installed, you’ll find a launcher for Termux on your home screen and/or your App Drawer. Locate that launcher and open the app. When the app opens, you should see a somewhat familiar terminal window

Installing Git and SSH
Before you can run the installation command, you need to update and upgrade. To do that, issue the command

apt update && apt upgrade

When the upgrade completes, you are ready to install both Git and SSH. To do that, issue the command:

apt install git openssh

This command will install both necessary apps.

Set up Git storage
It’s now time to set up Termux Storage. This is done with the command (from the Termux terminal):

termux-setup-storage

Upon running that command, you will be prompted to allow the app access to storage. Do so, and you’re ready for Git.

Connecting to GitHub
This is where it gets slightly tricky. From the Termux terminal, you must first create an ssh keypair. To do this, issue the command:

ssh-keygen -t rsa -C "EMAIL"

Where EMAIL is your email address associated with your GitHub account.

Once you generate the key, I suggest you use the scp command to copy it to a desktop computer. So change into the .ssh directory (on Termux) with the command:

cd .ssh

From within that directory, issue the command:

scp id_rsa.pub USER@IP:/home/USER/

Where USER is a remote username and IP is the remote address of a desktop on the same network as your Android device (that accepts SSH connections).

Once you have that file stored on a remote desktop, you need to log into GitHub (from the desktop now housing the .pub file) and go to Settings | SSH Keys. Copy that id_rsa.pub key into Git and save it.

Logging into Git
Now that you copied your SSH public key to GitHub, you can log into your GitHub account with the command:

ssh -T [email protected]

Once you authenticated, you are ready to start working with Git from your Android device. Create repositories, push, pull, and more. You might want to also do yourself a favor and install the nano editor, via Termux (with the command apt install nano), so you can actually edit code.

And there you go. A handy way to work with Git on your Android device. Now … git to work.

Want your business to be the top-listed Computer & Electronics Service in Kabwe?
Click here to claim your Sponsored Listing.

Telephone

Website

Address

Kabwe