I am experiencing issues with the keychain package while using it in Termux on an Android device. The command keychain --eval --agents ssh does not seem to set the SSH_AUTH_SOCK and SSH_AGENT_PID environment variables correctly. I receive the message "Waiting 5 seconds for lock..." but no lock files are found, and the variables remain unset.
What steps will reproduce the bug?
Install keychain in Termux using:
pkg install keychain
Open a new Termux session.
Run the command:
eval $(keychain --eval --agents ssh)
Observe that the output indicates waiting for a lock:
* Waiting 5 seconds for lock...
Check for environment variables:
echo $SSH_AUTH_SOCK
echo $SSH_AGENT_PID
Notice that these variables are not set.
What is the expected behavior?
The keychain command should successfully initialize the SSH agent and set the SSH_AUTH_SOCK and SSH_AGENT_PID environment variables, allowing for seamless SSH key management.
System information
**Termux Info:**
Termux Variables:
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=11475
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.medzik.dev/termux/termux-main stable main
Updatable packages:
All packages up to date
termux-tools version:
1.43.6
Android version:
10
Kernel build information:
Linux localhost 4.14.116 #1 SMP PREEMPT Mon Oct 16 19:13:50 CST 2023 aarch64 Android
Device manufacturer:
HUAWEI
Device model:
STK-L22
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Keychain Info:
* keychain 2.8.5 ~ http://www.funtoo.org
Copyright 2002-2006 Gentoo Foundation;
Copyright 2007 Aron Griffis;
Copyright 2009-2017 Funtoo Solutions, Inc;
lockfile() Copyright 2009 Parallels, Inc.
Keychain is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
Thanks! This should be fixed by #21737 in version 2.8.5-2 of the keychain package. Update to it with pkg up (it might take some time for the updated package to reach all mirrors).
Problem description
I am experiencing issues with the
keychain
package while using it in Termux on an Android device. The commandkeychain --eval --agents ssh
does not seem to set theSSH_AUTH_SOCK
andSSH_AGENT_PID
environment variables correctly. I receive the message "Waiting 5 seconds for lock..." but no lock files are found, and the variables remain unset.What steps will reproduce the bug?
keychain
in Termux using:What is the expected behavior?
The
keychain
command should successfully initialize the SSH agent and set theSSH_AUTH_SOCK
andSSH_AGENT_PID
environment variables, allowing for seamless SSH key management.System information
Keychain Info:
Related Issues: