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
Cloning Git Pod repo is taking too long (git --depth 1 problem) #2481
Comments
+1 |
To fix this temporally I've removed from 'cocoapod-downloader' gem '--depth 1' parameter in git.rb line 63. |
I don't see anithing special in the man pages of git 1.9.3: https://github.com/git/git/blob/v1.9.3/Documentation/git-clone.txt#L182-L184 Is the issue present only with this repo? |
Doesn't happen for Github repos. We're using Github Enterprise and that's maybe the issue. I'm guessing that if the remote is not updated (meaning able to provide support for --depth 1) than it's hanging in indefinite loop (or taking just too long to wait for it). Otherwise I have no clue where is the problem. :( |
I tried to review the details, there seems to be a problem with Github Enterprise. |
Some context:
|
newest bower disabled shallow cloning for non-github hosts |
having the same issue |
So a white list of host supporting the depth argument? @CocoaPods/Core |
@fabiopelosin From quick reading, it appears that the exact cause is not know yet, so working around it before then sounds like a bad idea. Maybe I’m missing it in any of the linked issues, if so, please describe the actual technical reason here on this ticket. |
If anyone can share a publicly accessible repo that exhibits this problem, I'll do my best to track it down. |
Because it's failing mainly for Github Enterprise and those are private repos by design, I don't think (IMHO) you can simulate this with public repo. :( |
@martincik Seeing as you can at least reproduce this issue, can you spend some time to look into a fix that would still download as little as possible? If you are unable to find a fix at all, then please file a ticket with GitHub and share that with us here and we’ll look into a workaround such as an option to disable it. |
Maybe someone can invite @segiddins to sample private github enterprise repository? |
Can you help me out with the patch here: CocoaPods/cocoapods-downloader#31 Thank you. Ladislav |
@martincik I'm hesitant to merge a patch like that, since it likely will result in slowing clones of many repos, likely unnecessarily. |
Roger that. Any other way to do it? I'm willing to write the patch and learn from it, but don't know which way to go. Suggestions? |
@martincik I couldn't tell you, since I have yet to see a repo where this is the issue. |
Alas, this should probably be an option somehow. Either CLI or Podfile. I’m on the fence about adding it to the Podfile, although that does seem to be what makes the most sense, as it will be the same for all people using those repos. |
We solved it by using 'git://' instead of 'https://' and it works perfectly. It's good enough for us. Thanks guys for trying to help. ;) |
@martincik Oh! Well it’s great to know that there’s a difference there, whatever the technical reason is exactly. Thanks for that info! |
@martincik I was just wondering if maybe GHE does not support Git's Smart HTTP transport and that's why using |
@martincik @neonichu I have personally asked GH:E support and you're right, they have an issue over http(s) connections. Here's a reply:
So I guess we don't have to do some workaround patch to the CocoaPods itself. |
@akisute Thanks for coming back to us with the reply. :) 👍 |
@akisute @neonichu @martincik |
By example https://github.com/CocoaPods/Specs/blob/master/Specs/mocean-sdk-ios/3.1.0/mocean-sdk-ios.podspec.json doesn't work at the moment! |
In bower we'll whitelist hosts that support shallow clones. For now it's only GitHub. In next minor release we'll allow for adding hosts to whitelist. |
in general the new implementation fails more often then the old one in our ci environment. |
Hey guys,
I'm working with new CocoaPods 0.34.0.rc2 and git version '1.9.3 (Apple Git-50)', Xcode 6.
My Podfile with line like this:
Is resulting in git clone with params '--single-branch --depth 1'. Where the '--depth 1' is causing the taking too long problem.
When I remove the '--depth 1' it works perfectly fine and is finished in 10 seconds.
Can somebody confirm the same issue?
The text was updated successfully, but these errors were encountered: