Fail to clone projects with `sparseCheckoutDir` set and `main` as a default branch
See original GitHub issueDescribe the bug
Starting Quarkus REST API
devfile from Get Started Page
fails to clone the project.
It seems to be related to
sparseCheckoutDir: getting-started
and changes in the repo: now default branch is main
(previously master
)
Che version
- latest
- nightly
- other: please specify
Steps to reproduce
- Start a new workspace from the
Quarkus REST API
devfile. - The workspace starts, It is starting to clone but never finish, no error message. The quarkus project folder is empty.
Expected behavior
Should clone the project
Runtime
- kubernetes (include output of
kubectl version
) - Openshift (include output of
oc version
) - minikube (include output of
minikube version
andkubectl version
) - minishift (include output of
minishift version
andoc version
) - docker-desktop + K8S (include output of
docker version
andkubectl version
) - other: (please specify)
Screenshots
Installation method
- chectl
- provide a full command that was used to deploy Eclipse Che (including the output)
- provide an output of
chectl version
command
- OperatorHub
- I don’t know
Environment
- my computer
- Windows
- Linux
- macOS
- Cloud
- Amazon
- Azure
- GCE
- other (please specify)
- Dev Sandbox (workspaces.openshift.com)
- other: please specify
Eclipse Che Logs
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Cloning fails for repos using 'main' as the default branch name
Set the default branch name to an empty string or nil . Avoid using git 's -b flag when the previous variable is...
Read more >What determines default branch after "git clone"?
It prefers a branch named refs/heads/master : if both HEAD and master point to the same object ID, then clone will set the...
Read more >Unable to change Default branch of a repository - GitLab.org
The default branch on one of our repos is permanently stuck on master . Attempting to change it to a different branch yields...
Read more >Chapter 3. Developer workspaces - Red Hat Customer Portal
Creating a workspace from the default branch of a Git repository; 3.1.3. Creating a workspace from a ... a list of pre-defined commands;...
Read more >5 steps to change GitHub default branch from master to main
Follow these easy 5 steps to change the default branch name in your repo to 'main' instead of 'master' to show support for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m seeing a similar issue when trying to use
sparseCheckoutDir
in the developer sandbox (workspaces.openshift.com). My devfile hasWhen the project gets checked out, the UI and the tooling (running
git branch
) showsmaster
, yet the source code thats checked out reflects the correct branch (thesolution
branch in my specific case).I submitted this as #20157
@l0rd fair enough Closing the issue since devfile v2 doesn’t support sparseCheckoutDir feature