Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Bug(?) fail empty repository clone with ssh(others working well)

Thank you H. I solved temporarily it your solution.

I agree your opinion, https://bugs.eclipse.org/bugs/show_bug.cgi?id=442493 this fix isn't working well. (msysgit + jgit).

2015-01-30 2:22 GMT+09:00 Petr Hrebejk <phrebejk@xxxxxxxxxxxx>:

Yes, this problem exists. Combination of empty jgit repo + latest (1.9.5) windows git bash + ssh protocol leads to not being able to clone.
However this bug is already reported because it this the same one, which causes the non standard warnings on cloning empty repos. Namely:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=442493

Removing the two lines :

+  if (adv.isEmpty())
+   adv.advertiseId(ObjectId.zeroId(), "capabilities^{}"); //$NON-NLS-1$

in UploadPack solves the problems. IMO keeping this there may force many users to use patched jGit. It was introduced in:

commit ae1f46989c0515dce640ab339453b09810c0c5a5
Author: Colby Ranger <cranger@xxxxxxxxxx>
Date:   Thu Aug 8 07:57:49 2013 -0700

and was probably wrong way of fixing the bug. If nothing else then this behavior should at least be made configurable.

Thanks
H

On 01/29/2015 06:00 AM, 오혁 wrote:
=========== ENVIRONMENT =========================
OS: Windows 7
Git repository(Server): jgit with java
Sshd: apache mina-sshd
Git Client(Working): msysgit

=========== PROBLEM ============================
Simply I can't clone my git repository via ssh.
I think UploadPack(jgit) isn't work when the repository is empty.

if i clone empty repository with ssh protocol
i got the message like below:
[fatal: could not fetch refs from username@domain:owner/projectname.git]

I got this fatal message and fail to clone.
I can't have no repository in my working directory.

So, I want to same work with ssh protocol.

I think UploadPack isn't same work with ssh protocol like others protocol.

=========== LOG ============================
Naver@AD00030229 ~/testPlace
$ ls
 >
### http protocol use ###
Naver@AD00030229 ~/testPlace
$ git clonehttp://oh4851@xxxxxxxxx.navercorp.com/oh4851/aaaaaaadd
Cloning into 'aaaaaaadd'...
Password for 'http://oh4851@xxxxxxxxx.navercorp.com
<http://oh4851@xxxxxxxxx.navercorp.com/>':
Checking connectivity... done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.

### file protocol use ###
Naver@AD00030229 ~/testPlace
$ git clone filePro/ fileProCase
Cloning into 'fileProCase'...
warning: You appear to have cloned an empty repository.
done.

### ssh protocol use ###
Naver@AD00030229 ~/testPlace
$ git clone 1111@localhost:1111/P1
Cloning into 'P1'...
fatal: could not fetch refs from 1111@localhost:1111/P1

### result ###
### http, file -> got empty repository in my working dir ###
### ssh -> i didn't get empty repository im my working dir ###
Naver@AD00030229 ~/testPlace
$ ls
aaaaaaadd filePro fileProCase


_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev




Back to the top