Table of contents
Do you know there is a way to build a full project with your android ??. Here, termux works as the command line interface and, there are several IDEs(Integrated Development Environments) on androids such as Acode, Spck editor, Code editor, etc.
Note: Avoid downloading termux on play store, download it on Fdroid, click here to set up termux and install git
Now, let's take a cup of coffee โ and get to work
Firstly, let's discuss how to generate ssh keys from termux.
Install the
openssh
package in Termux by runningpkg install openssh
Once the installation is complete, generate a new SSH key by running
ssh-keygen -t ed25519 -C your_email
Replace your_email with your Gmail account associated with GitHub
The
ssh-keygen
command will prompt you to enter a file name for the key pair. You can leave the default value by pressing Enter.You will then be prompted to enter a passphrase. You can leave this blank if you don't want to use a passphrase, or enter a passphrase if you want to add an extra layer of security.
Once the key pair is generated, you can view the public key by running
cat ~/.ssh/id_ed25519.pub
Copy the output of the command and add it to your GitHub account. You can follow the steps here.
Now let's integrate termux into the GitHub account
Open the terminal in Termux and run
eval $(ssh-agent -s)
to start the SSH agentAdd your private SSH key to the SSH agent by running
ssh-add ~/.ssh/id_ed25519
If you used a different file name for your SSH key, replace
id_ed25519
with the appropriate file name.To verify that the SSH key has been added to the SSH agent, run
ssh-add -l
. You should see the fingerprint of your SSH key listed.Finally, you can connect to your GitHub account by running `ssh -T git@github.com`
The first time you connect to GitHub, you may see a message asking you to confirm the authenticity of the host. Type
yes
to confirm.If everything is set up correctly, you should see a message that says "Hi {your GitHub username}! You've successfully authenticated, but GitHub does not provide shell access."
You can now use Git commands to clone, push and pull code to and from your GitHub account using the SSH protocol in Termux
Cloning a repository using the SSH URL is a storm in a teacup:
run
git clone ssh_url_of_your_repo
The ssh_url_of_your_repo should be replaced by the SSH URL of your repository. Here is a way to get the SSH URL of your repository
You are good to go. You can now use your android to write codes freely and push them to GitHub.
Thanks for reading patiently. For more of this, follow me on Twitter. ๐๐