git-clone removes destination path after permission deny
- From
- Agis <agis.anast@gmail.com>
- Date
- Aug 16, 2018, 12:08 UTC
- Message-ID
- <A1C23FEE-55CC-4888-9BD5-1C4566E83A38@gmail.com>
Hello.
I've recently observed the following:
$ mkdir foo
$ # try to clone from a repository that you have no access to
$ git clone git@github.com:agis/private.git foo
Cloning into 'foo'...
Permission denied (publickey).
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.
$ ls foo
ls: cannot access 'foo': No such file or directoryIs this expected behavior?
Thanks in advance, Agis
P.S. If this is something that should be fixed, I'd be happy to prepare a patch