allegory-software / allegory-sdk

:candy: Self-contained cross-platform programming environment for developing web-based database-driven business apps in LuaJIT and JavaScript
MIT License
79 stars 6 forks source link

Cloning failed #4

Closed gvanem closed 2 years ago

gvanem commented 2 years ago

Cloning this project on Windows with Git-2 is impossible for me (git version 2.35.0.windows.1):

md Git-latest
cd Git-latest
git clone -j8 https://github.com/allegory-software/allegory-sdk.git .
git submodule update --init --recursive

The last command yields these errors:

Submodule 'c/bcrypt/src' (git@github.com:allegory-software/allegory-sdk-bcrypt.git) registered for path 'c/bcrypt/src'
...
Submodule 'c/zlib-ng/src' (git@github.com:allegory-software/allegory-sdk-zlib-ng.git) registered for path 'c/zlib-ng/src'
Cloning into 'F:/MinGW32/src/LUA/Allegory-Software/Git-latest/c/bcrypt/src'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

The publickey could be a hint. But I fail to grasp what exactly; missing ssh key? Similar to this: https://github.com/kujason/avod/issues/8

After patching .git/config into https://github.com/allegory-software.. a git submodule update --init --recursive worked. But a git pull failed (!)

So why can't we clone with https://? Always works here.

capr commented 2 years ago

Well you have to put a full URL AFAIK when you clone a submodule, and since I'm always using only SSH (because I also push not just pull and I don't want to mess with password agents and other crap), that's what you get. You can teach your git to always clone everything via https though with a rewrite rule.

capr commented 2 years ago

Btw you only need the submodules if you want to rebuild the binaries.

capr commented 2 years ago

Wait, I was wrong, looks like you can use relative URLs after all. I'll change and test.

capr commented 2 years ago

Yup it works, but do git checkout dev before cloning the submodules.

gvanem commented 2 years ago

So my steps would be:

md Git-latest
cd Git-latest
git clone -j8 https://github.com/allegory-software/allegory-sdk.git .
git checkout dev
git submodule update --init --recursive

This works.