Skip to content

Git clone from local folder broken? #5469

Open
@fliiiix

Description

@fliiiix

Im not able to clone a local git repo to an other folder:

PS C:\> $env:GIT_TRACE=1
PS C:\> git clone -v C:\template\ foo
21:03:17.531368 exec-cmd.c:266          trace: resolved executable dir: C:/mingit/mingw64/bin
21:03:17.547014 git.c:476               trace: built-in: git clone -v 'C:\template\' foo
Cloning into 'foo'...
21:03:17.547014 run-command.c:668       trace: run_command: unset GIT_DIR; GIT_PROTOCOL=version=2 'git-upload-pack '\''C:\template\/.git'\'''
21:03:17.562719 run-command.c:929       trace: start_command: C:/mingit/mingw64/bin/busybox.exe -c 'git-upload-pack '\''C:\template\/.git'\''' 'git-upload-pack '\''C:\template\/.git'\'''
-c: applet not found
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Here is how i installed it

echo $PSVersionTable
$ErrorActionPreference = 'Stop'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri $('https://github.com/git-for-windows/git/releases/download/v2.48.1.windows.1/MinGit-2.48.1-busybox-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) -OutFile 'mingit.zip' -UseBasicParsing
Expand-Archive mingit.zip -DestinationPath c:\mingit
Remove-Item mingit.zip -Force
$env:Path += ";c:\mingit\cmd"

Seems similar to #5121

cloning a remote repo seems to work fine

PS C:\> git clone https://github.com/git-for-windows/git.git
21:09:19.793756 exec-cmd.c:266          trace: resolved executable dir: C:/mingit/mingw64/bin
21:09:19.793756 git.c:476               trace: built-in: git clone https://github.com/git-for-windows/git.git
Cloning into 'git'...
21:09:19.809389 run-command.c:668       trace: run_command: git remote-https origin https://github.com/git-for-windows/git.git
21:09:19.809389 run-command.c:929       trace: start_command: git remote-https origin https://github.com/git-for-windows/git.git
21:09:19.825014 exec-cmd.c:266          trace: resolved executable dir: C:/mingit/mingw64/bin
21:09:19.825014 git.c:771               trace: exec: git-remote-https origin https://github.com/git-for-windows/git.git
21:09:19.825014 run-command.c:668       trace: run_command: git-remote-https origin https://github.com/git-for-windows/git.git
21:09:19.825014 run-command.c:929       trace: start_command: git-remote-https origin https://github.com/git-for-windows/git.git
21:09:19.840640 exec-cmd.c:266          trace: resolved executable dir: C:/mingit/mingw64/bin
21:09:21.207576 run-command.c:668       trace: run_command: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 720 on 953b78ed75f6' --check-self-contained-and-connected
21:09:21.207576 run-command.c:929       trace: start_command: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 720 on 953b78ed75f6' --check-self-contained-and-connected
21:09:21.223055 exec-cmd.c:266          trace: resolved executable dir: C:/mingit/mingw64/bin
21:09:21.223055 git.c:476               trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 720 on 953b78ed75f6' --check-self-contained-and-connected
remote: Enumerating objects: 642327, done.
remote: Counting objects: 100% (3485/3485), done.
remote: Compressing objects: 100% (1387/1387), done.
remote: Total 642327 (delta 2818), reused 2124 (delta 2098), pack-reused 638842 (from 3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions