Brand new clone of ansible git project:
git clone --recursive https://github.com/ansible/ansible.git
Fails with the following error:
fatal: reference is not a tree: f624689bad24cb3a7b2ef43d5280b5f4fbabb5bd
Unable to checkout 'f624689bad24cb3a7b2ef43d5280b5f4fbabb5bd' in
submodule path 'lib/ansible/modules/core'
Not sure why this is failing as I've been able to clone and pull since
the module split. This just started happening this morning.
Got the same thing, lazy workaround for now, commands at the ansible_repo level -
rm -rf lib/ansible/modules/core
cd lib/ansible/modules/
git clone https://github.com/ansible/ansible-modules-core.git
mv ansible-modules-core core
cd ~/{your_ansible_repo)
git submodule update --init lib/ansible/modules/extras
source and you should be good.
And a better fix is -
git clone --recursive https://github.com/ansible/ansible.git
Hi Michael, I’m not getting the same result.
When I run: git clone --recursive https://github.com/ansible/ansible.git test-clone, things seem to work fine:
Cloning into ‘test-clone’…
remote: Counting objects: 68196, done.
remote: Compressing objects: 100% (147/147), done.
remote: Total 68196 (delta 78), reused 2 (delta 0)
Receiving objects: 100% (68196/68196), 21.21 MiB | 1.01 MiB/s, done.
Resolving deltas: 100% (42941/42941), done.
Checking connectivity… done.
Submodule ‘lib/ansible/modules/core’ (git://github.com/ansible/ansible-modules-core.git) registered for path ‘lib/ansible/modules/core’
Submodule ‘lib/ansible/modules/extras’ (git://github.com/ansible/ansible-modules-extras.git) registered for path ‘lib/ansible/modules/extras’
Cloning into ‘lib/ansible/modules/core’…
remote: Counting objects: 18738, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 18738 (delta 10), reused 2 (delta 0)
Receiving objects: 100% (18738/18738), 5.25 MiB | 1.19 MiB/s, done.
Resolving deltas: 100% (12495/12495), done.
Checking connectivity… done.
Submodule path ‘lib/ansible/modules/core’: checked out ‘cb69744bcee4b4217d83b4a30006635ba69e2aa0’
Cloning into ‘lib/ansible/modules/extras’…
remote: Counting objects: 18761, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 18761 (delta 4), reused 6 (delta 3)
Receiving objects: 100% (18761/18761), 5.17 MiB | 557.00 KiB/s, done.
Resolving deltas: 100% (12526/12526), done.
Checking connectivity… done.
Submodule path ‘lib/ansible/modules/extras’: checked out ‘8a4f07eecd2bb877f51b7b04b5352efa6076cce5’
So maybe something else is going on here?
It's working now. The exact same command was failing for me on
multiple machines. Maybe a github hiccup...
I fixed this myself earlier.
Apparently this is an issue with one of the checkouts having some commits which were not pushed, I don’t expect this to happen again, but it’s easily resolved by updating the submodules.
Thanks!