cmajor-lang / cmajor

The Cmajor public repository
https://cmajor.dev
Other
534 stars 31 forks source link

Failed to do git clone #17

Closed ghost closed 1 year ago

ghost commented 1 year ago
$ git clone --recursive https://github.com/SoundStacks/cmajor
Cloning into 'cmajor'...
remote: Enumerating objects: 2270, done.
remote: Counting objects: 100% (2270/2270), done.
remote: Compressing objects: 100% (908/908), done.
remote: Total 2270 (delta 1392), reused 2206 (delta 1344), pack-reused 0
Receiving objects: 100% (2270/2270), 1.37 MiB | 4.50 MiB/s, done.
Resolving deltas: 100% (1392/1392), done.
Submodule '3rdParty/choc' (git@github.com:Tracktion/choc.git) registered for path 'include/choc'
Cloning into '/home/Administrator/cmajor/include/choc'...
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
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.
fatal: clone of 'git@github.com:Tracktion/choc.git' into submodule path '/home/Administrator/cmajor/include/choc' failed
Failed to clone 'include/choc'. Retry scheduled
Cloning into '/home/Administrator/cmajor/include/choc'...
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.
fatal: clone of 'git@github.com:Tracktion/choc.git' into submodule path '/home/Administrator/cmajor/include/choc' failed
Failed to clone 'include/choc' a second time, aborting
cesaref commented 1 year ago

It looks like you are using https to clone from github, but the sub-repo (choc) is configured as an ssh connection. We tend to use ssh not https for our work, so you really need to setup ssh for the clone to work. We'd have the same problem the other way around if we used https and you used ssh, so there is no way around this that i'm aware of

You'll want to follow the instructions here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh

cesaref commented 1 year ago

I've just seen the comment on this post: https://stackoverflow.com/questions/40841882/automatically-access-git-submodules-via-ssh-or-https

`For Github I have this in my ~/.gitconfig:

[url "ssh://git@github.com/"] insteadOf = https://github.com/`

You may be able to get around this by doing the opposite - converting ssh:// into https://