New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using --depth 1 breaks clones from RhodeCode 1.7 servers #744

Closed
ghost opened this Issue Aug 8, 2013 · 5 comments

Comments

Projects
None yet
1 participant
@ghost
Copy link

ghost commented Aug 8, 2013

For our app, we use a RhodeCode git server as a private repository server. Until Bower 1.0 we had no issues using repos from this server. After upgrading to 1.0 we can't clone repos from this server using Bower. We managed to track this down to the use of the --depth parameter on the git clone call from Bower.

This is a known issue with RhodeCode (https://bitbucket.org/marcinkuzminski/rhodecode/issue/596/cloning-a-git-repo-using-depth-1-fails), but the author has no idea how to solve it, and until now it hadn't been a major issue on their side. I will add a comment to that issue as well, to see if it can be fixed on their end.

Would it be possible to make the depth parameter configurable?

@satazor

This comment has been minimized.

Copy link
Member

satazor commented Aug 8, 2013

I think we can gracefully fallback to not using --depth=1 if it fails. I will implement that shortly.

@ghost

This comment has been minimized.

Copy link

ghost commented Aug 9, 2013

I've tried your branch, but it still fails for me. I get the following error message:
error: RPC failed; result=22, HTTP code = 417
fatal: The remote end hung up unexpectedly

It seems the way you detect the lack of --depth=1 support is not working for RhodeCode servers. Again, this issue lies primarily with RhodeCode, so thanks for trying to solve it.

@satazor

This comment has been minimized.

Copy link
Member

satazor commented Aug 9, 2013

@chevalric I've created a trial account to get access to a git server on RhodeCode, but it failed. So I couldn't debug this myself.
Can you make a console.log of the various statements used in this conditional to see what is failing? Or perhaps you can give me access to a dummy repository so I can identify the issue.

If you do not have experiencing in setting up a global bower from a branch:

1 - Clone the repository somewhere
2 - Switch to shallow-fallback branch
3 - sudo npm link

After this, the global bower is mapped to the folder you cloned to.

@satazor

This comment has been minimized.

Copy link
Member

satazor commented Aug 9, 2013

I finally got access to a trial account, though it fails to make this git command: git ls-remote --tags --heads https://xxxxxx.rhodecode.com/test-repo.git with:

fatal: https://xxxxxx.rhodecode.com/test-repo.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

In fact, the same error actually happens on a normal git clone.

@satazor

This comment has been minimized.

Copy link
Member

satazor commented Aug 10, 2013

I've made some changes to the PR and it works.
Note that I use git+https:// to signal it as a git endpoint, since RhodeCode does not support cloning with .git appended to the URL.

screen shot 2013-08-10 at 12 35 44 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment