git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-clone removes destination path after permission deny
@ 2018-08-16 12:08 Agis
  2018-08-16 12:16 ` Agis
  0 siblings, 1 reply; 3+ messages in thread
From: Agis @ 2018-08-16 12:08 UTC (permalink / raw)
  To: git

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 directory

Is 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-clone removes destination path after permission deny
  2018-08-16 12:08 git-clone removes destination path after permission deny Agis
@ 2018-08-16 12:16 ` Agis
  2018-08-16 23:43   ` Jonathan Nieder
  0 siblings, 1 reply; 3+ messages in thread
From: Agis @ 2018-08-16 12:16 UTC (permalink / raw)
  To: git

Nevermind, this is does not happen in 2.18.0. Apparently it was fixed somewhere between 2.11 and 2.18.

> On 16 Aug 2018, at 15:08, Agis <agis.anast@gmail.com> wrote:
> 
> 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 directory
> 
> Is 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
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-clone removes destination path after permission deny
  2018-08-16 12:16 ` Agis
@ 2018-08-16 23:43   ` Jonathan Nieder
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Nieder @ 2018-08-16 23:43 UTC (permalink / raw)
  To: Agis; +Cc: git, Jeff King

Hi,

Agis wrote:
> On 16 Aug 2018, at 15:08, Agis <agis.anast@gmail.com> wrote:

>>    $ mkdir foo
>>    $ git clone git@github.com:agis/private.git foo
>>    Cloning into 'foo'...
>>    Permission denied (publickey).
>>    fatal: Could not read from remote repository.
[...]
>>    $ ls foo
>>    ls: cannot access 'foo': No such file or directory
>>
>> Is this expected behavior?
[...]
> Nevermind, this is does not happen in 2.18.0. Apparently it was
> fixed somewhere between 2.11 and 2.18.

Indeed, this was fixed by v2.16.2~5^2 (clone: do not clean up
directories we didn't create, 2018-01-02).

Cc-ing the author of that change (Peff) so he can meet a happy
user of it. :)

Thanks and hope that helps,
Jonathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-16 23:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-16 12:08 git-clone removes destination path after permission deny Agis
2018-08-16 12:16 ` Agis
2018-08-16 23:43   ` Jonathan Nieder

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).