Skip to content

Commit 8f782e6

Browse files
source-control: termux ssh-agent and ssh-add key
1 parent 07a5e76 commit 8f782e6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/source-control/git-configuration.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,28 @@ Add Git SSH key passphrase to Operating System keychain to avoid typing in the p
163163

164164
The command line terminal can be used to delete keys from the MacOSX keychain using the ssh-add command with the -d keyname to delete a specific key or -D option to delete all user added keys.
165165

166+
=== "Termux"
167+
Termux does not provide a persistent keyring, so an SSH agent can be run manually to manage the SSH key passphrase for the current terminal session.
168+
169+
Start the agent.
170+
171+
```shell
172+
ssh-agent
173+
```
174+
175+
Capture the details of the agent in the terminal shell
176+
177+
```shell
178+
eval $(ssh-agent)
179+
```
180+
181+
Add the SSH key passphrase to the agent, allowing the SSH key to be used without repeatedly entering the passphrase until the terminal session is closed.
182+
183+
```shell
184+
ssh-add ~/.ssh/engineering
185+
```
186+
187+
166188
## Commit signing with SSH Key
167189

168190
The SSH key can be registered with your GitHub account as a signing key, as opposed to an authorization key used to access a remote repository securely.

0 commit comments

Comments
 (0)