Replies: 9 comments 13 replies
-
How do you push through the |
Beta Was this translation helpful? Give feedback.
-
I also have this issue |
Beta Was this translation helpful? Give feedback.
-
You need to configure SSH on YOUR SYSTEM not Lazygit, maybe the agent is not working. Maybe bad configuration. |
Beta Was this translation helpful? Give feedback.
-
i have the same issue. lazygit is giving me error: Permission denied (publickey, password) and I am Debian user. i guess lazygit is not working properly here. as simple as that |
Beta Was this translation helpful? Give feedback.
-
For what it's worth: When starting lazygit, it asks me for password for Key 2, which isn't required to access the git server anymore. |
Beta Was this translation helpful? Give feedback.
-
I had this problem because my project's remote repo was configured to use password auth (I guess by VSCode). In your project try > origin https://github.com/YOUR_GIHUB_USERNAME/YOUR_REPO_NAME.git (fetch) Solution: git remote set-url origin [email protected]:YOUR_GIHUB_USERNAME/YOUR_REPO_NAME.git Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Did anyone find a Windows specific solution? It worked just fine when I tested on Linux but my main workspace is on Windows because I have issues with WSL2. |
Beta Was this translation helpful? Give feedback.
-
i think i have found why it fails on window. not sure what could be a workaround. |
Beta Was this translation helpful? Give feedback.
-
Had this problem resolved it writing myself a wrapper function around lazygit that replaced my alias: # wrapper for lazygit to init ssh-agent
lg() {
local IS_AGENT IS_IDENTIFIED FIRST_AVAILABLE
IS_AGENT="$(pgrep -u "$USER" ssh-agent)"
local PRIMARY_SSH_KEY="$HOME/.ssh/github_auth_primary"
local FALLBACK_SSH_KEY="$HOME/.ssh/github_auth_fallback"
if [ -f "$PRIMARY_SSH_KEY" ]; then
FIRST_AVAILABLE="$PRIMARY_SSH_KEY"
else
if [ -f "$FALLBACK_SSH_KEY" ]; then
FIRST_AVAILABLE="$FALLBACK_SSH_KEY"
else
echo "No SSH keys found. Exiting."
return 1
fi
fi
if [ -z "$IS_AGENT" ]; then
echo "SSH agent not running. Should have been bootstraped with the shell."
echo -e "Run \`eval \"\$(ssh-agent -s)\"\` to start it. Investigate why not running."
return 1
fi
IS_IDENTIFIED=$(ssh-add -l | grep "[email protected]")
if [ -z "$IS_IDENTIFIED" ] && [ -f "$FIRST_AVAILABLE" ]; then
/usr/bin/ssh-add "$FIRST_AVAILABLE" &&
lazygit
else
lazygit
fi
}
If anyone is better at scripting feel free to chime in with suggestions. |
Beta Was this translation helpful? Give feedback.
-
Every time I try to pull or push to a remote repo that is using the SSH link, It says, "Permission denied (publickey)". How can I resolve this??
Beta Was this translation helpful? Give feedback.
All reactions