Git 2.8 fails to update submodules
I am trying to build gRPC inside a docker image, but updating the submodules is failing when using git version 2.8. Specifically this Dockerfile:
FROM alpine:3.3
RUN apk update && apk add git
RUN git clone -b 'v1.17.1' --depth 1 https://github.com/grpc/grpc
RUN git --version
RUN cd grpc && git submodule update --init --depth 1
shows git version 2.8.6
and throws the following error
Cloning into '/grpc/third_party/abseil-cpp'...
error: no such remote ref cc4bed2d74f7c8717e31f9579214ab52a9c9c610
If I switch to alpine:3.8
I get git version 2.18.1
and the build is successful. Is this a bug in the earlier version of git? Is there a workaround?
Notes:
- I'm specifying
--depth 1
because I don't need the commit history. - I have some unrelated constraints which make it difficult to use a more recent version.
docker git-submodules
add a comment |
I am trying to build gRPC inside a docker image, but updating the submodules is failing when using git version 2.8. Specifically this Dockerfile:
FROM alpine:3.3
RUN apk update && apk add git
RUN git clone -b 'v1.17.1' --depth 1 https://github.com/grpc/grpc
RUN git --version
RUN cd grpc && git submodule update --init --depth 1
shows git version 2.8.6
and throws the following error
Cloning into '/grpc/third_party/abseil-cpp'...
error: no such remote ref cc4bed2d74f7c8717e31f9579214ab52a9c9c610
If I switch to alpine:3.8
I get git version 2.18.1
and the build is successful. Is this a bug in the earlier version of git? Is there a workaround?
Notes:
- I'm specifying
--depth 1
because I don't need the commit history. - I have some unrelated constraints which make it difficult to use a more recent version.
docker git-submodules
At.gitmodules
you should update latest commit id of your sub module atmaster
branch.
– Quỳnh Nguyễn
Jan 2 at 3:32
This commit idcc4bed2d74f7c8717e31f9579214ab52a9c9c610
couldn't for access from your main project.
– Quỳnh Nguyễn
Jan 2 at 3:33
@QuỳnhNguyễn if that is the problem, why does it work correctly with the newer version of git? btw the commit id exists.
– stewbasic
Jan 2 at 3:35
This may explain the problem: github.com/CocoaPods/cocoapods-downloader/issues/…
– stewbasic
Jan 2 at 4:14
add a comment |
I am trying to build gRPC inside a docker image, but updating the submodules is failing when using git version 2.8. Specifically this Dockerfile:
FROM alpine:3.3
RUN apk update && apk add git
RUN git clone -b 'v1.17.1' --depth 1 https://github.com/grpc/grpc
RUN git --version
RUN cd grpc && git submodule update --init --depth 1
shows git version 2.8.6
and throws the following error
Cloning into '/grpc/third_party/abseil-cpp'...
error: no such remote ref cc4bed2d74f7c8717e31f9579214ab52a9c9c610
If I switch to alpine:3.8
I get git version 2.18.1
and the build is successful. Is this a bug in the earlier version of git? Is there a workaround?
Notes:
- I'm specifying
--depth 1
because I don't need the commit history. - I have some unrelated constraints which make it difficult to use a more recent version.
docker git-submodules
I am trying to build gRPC inside a docker image, but updating the submodules is failing when using git version 2.8. Specifically this Dockerfile:
FROM alpine:3.3
RUN apk update && apk add git
RUN git clone -b 'v1.17.1' --depth 1 https://github.com/grpc/grpc
RUN git --version
RUN cd grpc && git submodule update --init --depth 1
shows git version 2.8.6
and throws the following error
Cloning into '/grpc/third_party/abseil-cpp'...
error: no such remote ref cc4bed2d74f7c8717e31f9579214ab52a9c9c610
If I switch to alpine:3.8
I get git version 2.18.1
and the build is successful. Is this a bug in the earlier version of git? Is there a workaround?
Notes:
- I'm specifying
--depth 1
because I don't need the commit history. - I have some unrelated constraints which make it difficult to use a more recent version.
docker git-submodules
docker git-submodules
asked Jan 2 at 3:26
stewbasicstewbasic
570417
570417
At.gitmodules
you should update latest commit id of your sub module atmaster
branch.
– Quỳnh Nguyễn
Jan 2 at 3:32
This commit idcc4bed2d74f7c8717e31f9579214ab52a9c9c610
couldn't for access from your main project.
– Quỳnh Nguyễn
Jan 2 at 3:33
@QuỳnhNguyễn if that is the problem, why does it work correctly with the newer version of git? btw the commit id exists.
– stewbasic
Jan 2 at 3:35
This may explain the problem: github.com/CocoaPods/cocoapods-downloader/issues/…
– stewbasic
Jan 2 at 4:14
add a comment |
At.gitmodules
you should update latest commit id of your sub module atmaster
branch.
– Quỳnh Nguyễn
Jan 2 at 3:32
This commit idcc4bed2d74f7c8717e31f9579214ab52a9c9c610
couldn't for access from your main project.
– Quỳnh Nguyễn
Jan 2 at 3:33
@QuỳnhNguyễn if that is the problem, why does it work correctly with the newer version of git? btw the commit id exists.
– stewbasic
Jan 2 at 3:35
This may explain the problem: github.com/CocoaPods/cocoapods-downloader/issues/…
– stewbasic
Jan 2 at 4:14
At
.gitmodules
you should update latest commit id of your sub module at master
branch.– Quỳnh Nguyễn
Jan 2 at 3:32
At
.gitmodules
you should update latest commit id of your sub module at master
branch.– Quỳnh Nguyễn
Jan 2 at 3:32
This commit id
cc4bed2d74f7c8717e31f9579214ab52a9c9c610
couldn't for access from your main project.– Quỳnh Nguyễn
Jan 2 at 3:33
This commit id
cc4bed2d74f7c8717e31f9579214ab52a9c9c610
couldn't for access from your main project.– Quỳnh Nguyễn
Jan 2 at 3:33
@QuỳnhNguyễn if that is the problem, why does it work correctly with the newer version of git? btw the commit id exists.
– stewbasic
Jan 2 at 3:35
@QuỳnhNguyễn if that is the problem, why does it work correctly with the newer version of git? btw the commit id exists.
– stewbasic
Jan 2 at 3:35
This may explain the problem: github.com/CocoaPods/cocoapods-downloader/issues/…
– stewbasic
Jan 2 at 4:14
This may explain the problem: github.com/CocoaPods/cocoapods-downloader/issues/…
– stewbasic
Jan 2 at 4:14
add a comment |
1 Answer
1
active
oldest
votes
As you can see in "How to make shallow git submodules?", multiple evolution have been made since Git 2.8.
If available, try and use only one step:
git clone -b 'v1.17.1' --recurse-submodule --depth 1 https://github.com/grpc/grpc
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54000895%2fgit-2-8-fails-to-update-submodules%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As you can see in "How to make shallow git submodules?", multiple evolution have been made since Git 2.8.
If available, try and use only one step:
git clone -b 'v1.17.1' --recurse-submodule --depth 1 https://github.com/grpc/grpc
add a comment |
As you can see in "How to make shallow git submodules?", multiple evolution have been made since Git 2.8.
If available, try and use only one step:
git clone -b 'v1.17.1' --recurse-submodule --depth 1 https://github.com/grpc/grpc
add a comment |
As you can see in "How to make shallow git submodules?", multiple evolution have been made since Git 2.8.
If available, try and use only one step:
git clone -b 'v1.17.1' --recurse-submodule --depth 1 https://github.com/grpc/grpc
As you can see in "How to make shallow git submodules?", multiple evolution have been made since Git 2.8.
If available, try and use only one step:
git clone -b 'v1.17.1' --recurse-submodule --depth 1 https://github.com/grpc/grpc
answered Jan 2 at 5:53
VonCVonC
845k29426783233
845k29426783233
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54000895%2fgit-2-8-fails-to-update-submodules%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
At
.gitmodules
you should update latest commit id of your sub module atmaster
branch.– Quỳnh Nguyễn
Jan 2 at 3:32
This commit id
cc4bed2d74f7c8717e31f9579214ab52a9c9c610
couldn't for access from your main project.– Quỳnh Nguyễn
Jan 2 at 3:33
@QuỳnhNguyễn if that is the problem, why does it work correctly with the newer version of git? btw the commit id exists.
– stewbasic
Jan 2 at 3:35
This may explain the problem: github.com/CocoaPods/cocoapods-downloader/issues/…
– stewbasic
Jan 2 at 4:14