-
Notifications
You must be signed in to change notification settings - Fork 249
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
Error: "Could not find commit hash for master" #37
Comments
Well derp, I was trying to run this on a new Macbook Pro that I hadn't installed Xcode or the Command Line Tools on, so It may be pertinent in the rare cases when people don't have |
Would be interesting if |
git update helped on windows 10 |
I just updated to latest git on Win 10 same problem:
Any more ideas? |
@oliverjanik Could you make sure |
Yeah git is usable from the same prompt. |
This error manifests itself in Travis CI too. Trying to use
|
I had the same problem using it in my wsl shell but had no problem using it in my powershell. |
I replaced degit with It isn't a pure replacement, and maybe doesn't have all the features you are using on degit, but it can suit most use cases. |
@docmars , @Rich-Harris I think we can close this issue, because I don't think anymore that it would be the case to adapt degit to don't depend on git, because it's exactly what gittar does. We can live with both libraries, each one with its pros and cons. Degit has more features, but requires git. Gittar is more simple, but doesn't requires git. Each developer chooses the one it sees fit. |
Agree with @paulocoghi here. For my small project I ended up using gittar as well. |
maybe you need to write about it in the documentation? |
Setting the cache value to false in the degit options solved this for me:
|
@cogoo, in the most cases, this error occurs when |
I have |
Thanks for saving me some time on this one... same situation, just did a phresh install with Catalina. You'd think the error message would be a little more... helpful. |
Just updated Xcode in App Store but did not open it. Tried to run the
After starting the updated Xcode for the first time it installed some components and after that, |
thanks @cogoo it worked !! |
If you're seeing the following error(s): ! could not find commit hash for rollup` or `$ npx degit https://github.com/sveltejs/sapper-template#webpack my-app ! could not find commit hash for webpack` It's because git isn't working. git depends on xcode and xcode requires you to accept it's license agreement. Try running "git" and if you see the following message: Also if you haven't installed degit you may need to do the following: |
I have the same error with sveltejs/template. Doc said to just run Results:
I use git everyday without any problems. |
@masterl did you try what I have suggested above? |
@vguhesan That doesn't apply. Everything is on the comment, I have git, node, npm, degit all installed. The issue seems to be on degit itself. |
@masterl , can you try again with |
@paulocoghi Where do I use that? running I tried running with this flag, but the result was the same:
|
@masterl , unfortunately you are right. As mentioned by @cogoo and @riazXrazor, when using degit on code (not as cli), setting But it seems that we can't do the same on cli. |
So, how to disable caching in degit? |
@PlkMarudny , this way: degit(<repo_url>, {
cache: false
}); |
I was just looking into getting degit to display more helpful error messages when it runs into a problem, and I found that it does display the underlying error if you call it with the verbose Edit: Or perhaps less intrusively: a gentle extra note that's displayed when there's an error with verbose mode off that the user can add |
I know this thread is covering a lot of different issues now, but I had the same "could not fetch remote":
but it turns out that my .gitconfig in my home directory had an invalid http proxy that I could no longer access. Hope this helps someone. |
@paulocoghi What if degit supports cloning local repos? That wouldn't work. I think we should properly display error messages so people can act to solve problems, not dodge them |
@bernardoadc , you are right 👍 I had not thought about this possibility and, in this case, it is interesting that Since |
I was getting this same error trying to run |
I run this "degit sveltejs/template my-svelte-project" on git terminal not the cmd .. and it works . |
fregante's mention above of #242/#207 helped me figure my encounter with this error message out |
Note that Github itself has seemingly begun to default new repos to a Today I ran into what looked like a |
A PR adding a check to see which branch is available between Edit: This PR (#243) from @fregante , provides an even better approach: read the default branch. |
D:\ANZ104AngularDemo\ANZ104AngularDemo\angular\taskbox>degit chromaui/intro-storybook-angular-template |
hi @rajeeshsays, please open an issue on the repository in question, as: npx degit chromaui/intro-storybook-svelte-template taskbox from intro-storybook-svelte-template works fine, and the command that you presumably ran correctly in a supported environment is in their readme: npx degit chromaui/intro-storybook-angular-template taskbox |
installed the latest git version 2.34.1.windows.1 Failed with same error |
turns out the github repo is at |
Hello. I am getting this error: ' degit radixdlt/create-scrypto-dapp I took the liberty of checking the comments before me, and I can confirm Git is working so I'm just wondering what else I can look into. Yes the URL is also fine. |
For @NateDawg360 and everyone else: please use |
I am also getting this error while using the JS Api I am on Arch Linux, with git installed. Its the error in the title + that it cannot find the commit hash of the repo |
Hey there—I'm trying to get started with Svelte and running:
Environment:
Running:
... gives me:
Double checking that the
user/repo
is correct, I'm not really sure why it can't find the hash. I tried it with a couple other repos out there and no-go.Any ideas?
The text was updated successfully, but these errors were encountered: