git clone
определенно не подчиняется локальной конфигурации - для клонирования пока нет локальной конфигурации, только глобальная. Попробуйте что-нибудь, что использует локальный конфиг; git fetch/pull/push
например:
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git fetch https://domain.doesnt.exist/blah master
22:21:01.075552 git.c:371 trace: built-in: git 'fetch' 'https://domain.doesnt.exist/blah' 'master'
22:21:01.076706 run-command.c:350 trace: run_command: 'ssh' 'domain.doesnt.exist' 'git-upload-pack '\''/blah'\'''
ssh: Could not resolve hostname domain.doesnt.exist: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Если вы хотите использовать url.insteadOf
для clone
без его глобальной настройки, вы можете передать значение конфигурации в командной строке:
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git -c url.ssh://.insteadof=https:// clone --verbose https://domain.doesnt.exist/blah
22:25:33.588762 git.c:371 trace: built-in: git 'clone' '--verbose' 'https://domain.doesnt.exist/blah'
Cloning into 'blah'...
22:25:33.596631 run-command.c:350 trace: run_command: 'ssh' 'domain.doesnt.exist' 'git-upload-pack '\''/blah'\'''
ssh: Could not resolve hostname domain.doesnt.exist: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.