Skip to content

debugging git push

By Claude.ai

To debug the issue with git push requiring repeated Yubikey touches, you can increase Git's verbosity to see what's happening behind the scenes. Here are a few approaches you can try:

  1. Use GIT_TRACE environment variable:

Run your git push command with increased verbosity like this:

GIT_TRACE=1 GIT_CURL_VERBOSE=1 GIT_SSH_COMMAND="ssh -vvv" git push

This will show you detailed information about the Git operations, including SSH connection attempts.

  1. Use GIT_SSH environment variable:

Set up a wrapper script for SSH and use it for debugging. Create a file named ssh-wrapper.sh with the following content:

#!/bin/bash
echo "SSH command: $@" >&2
ssh -vvv "$@"

Make it executable:

chmod +x ssh-wrapper.sh

Then use it with git push:

GIT_SSH=./ssh-wrapper.sh git push
  1. Use -v option with git push:

Simply add the -v (verbose) option to your git push command:

git push -v

This will show more information about the push process, though it might not be as detailed as the other methods.

These methods should help you see what's happening between the repeated retries and potentially identify why your Yubikey is being prompted multiple times. Look for any error messages, connection resets, or authentication failures in the output.

If you'd like me to help interpret the output or if you need more specific advice after trying these methods, please share the relevant parts of the debug output, and I'd be happy to assist further.