git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[Question] : git 2.33.1 asks every time password

From
JFJean-Louis FLOQUET <jese.jlf@gmail.com>
Date
Dec 30, 2021, 15:56 UTC
Message-ID
<CAHo1AWxzPsnLuT8JRWovtaRrGvRS8+0NyucU5K8VEnaL1xxW3Q@mail.gmail.com>
Hi,

I use some scripts to do some batch operations (pull / push), using rsa key and ssh-agent / ssh-add. I'm under Windows 10 (with all updates). When launching my script (see below, truncated : more than 100 repo), I have to enter rsa passphrase (OK) then all push/pull are done without any user interaction (no passphrase, no password, nothing) All Git versions up to 2.33.0.2 are working fine, but since 2.33.1, git asks every time the password. I had to create a 'config' file within '.ssh' directory to support my rsa key (too old format ?). Instructions according to https://stackoverflow.com/questions/35233777/git-error-unable-to-negotiate-with-xx-xx-xxx-xxx-no-matching-host-key-type-fo I also have seen that some people have to add 'ssh-add -K', but it seems to be only for MacOS. According to release notes for 2.33.1, Git Credential Manager for Windows has been replaced by Git Credential Manager Core, but I don't know if it is the "root" problem, and if yes, how to fix my issue. I would greatly appreciate any help / solution. Thanks in advance.

Best Regards, JL

=========================================================================================== transcript user@computer MINGW64 /my_path1 (master) $ ./pull_all.sh Loading agent... Adding key Agent pid 1968 Enter passphrase for /path_to_rsa_key: Identity added: /path_to_rsa_key (/path_to_rsa_key) key : finish

Repository = /my_path1 git pull --quiet my_server master Password authentication (user@server) Password:

Repository = /my_path2 git pull --quiet my_server master Password authentication (user@server) Password:

Repository = /my_path3 git pull --quiet my_server master Password authentication (user@server) Password:

Appuyer sur touche pour continuer
user@computer MINGW64 /my_path1 (master)
===========================================================================================
rsa_key
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,xxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -----END RSA PRIVATE KEY----- =========================================================================================== create_env.sh : !/bin/sh

# Note: ~/.ssh/environment should not be used, as it # already has a different purpose in SSH.

#Create directory if not exist mkdir -p ~/.ssh/

#Create variable env=~/.ssh/agent.env

#Create file if not exist touch $env

# Note: Don't bother checking SSH_AGENT_PID. It's not used # by SSH itself, and it might even be incorrect # (for example, when using agent-forwarding over SSH).

agent_is_running() { if [ "$SSH_AUTH_SOCK" ]; then # ssh-add returns: # 0 = agent running, has keys # 1 = agent running, no keys # 2 = agent not running ssh-add -l >/dev/null 2>&1 || [ $? -eq 1 ] else false fi }

agent_has_keys() { ssh-add -l >/dev/null 2>&1 }

agent_load_env() { echo "Loading agent..." . "$env" >/dev/null }

agent_start() { (umask 077; ssh-agent >"$env") . "$env" >/dev/null }

add_key() { echo "Adding key" eval `ssh-agent -s` ssh-add /path_to_rsa_key echo "key : finish" }

if ! agent_is_running; then agent_load_env fi ===========================================================================================

Next: brian m. carlson
Message 1 of 5 in “[Question] : git 2.33.1 asks every time password”
  1. Jean-Louis FLOQUETDec 30, 2021
  2. brian m. carlsonDec 30, 2021
  3. Jean-Louis FLOQUETDec 31, 2021
  4. Erik Cervin EdinDec 31, 2021
  5. Erik Cervin EdinDec 31, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.