1

I am following this tutorial - link

In this, you need access to a private repo called charting_library, which I do.

As written in the documentation, The Charting Library is free, but its code is in the private repository on GitHub. Make sure that you have access to this repository: https://github.com/tradingview/charting_library/. I don't see any error but I can see the code here.

So following the documentation, when I run this

git clone https://github.com/tradingview/charting-library-tutorial.git

The repo gets cloned, no problem. But then when I run the next command

git submodule update --init --recursive

I get the following error

Cloning into 'C:/coding/charting-library-tutorial/charting_library_clonned_data'...
Host key verification failed.
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:tradingview/charting_library.git' into submodule path 'C:/coding/charting-library-tutorial/charting_library_clonned_data' failed
Failed to clone 'charting_library_clonned_data'. Retry scheduled
Cloning into 'C:/coding/charting-library-tutorial/charting_library_clonned_data'...
Host key verification failed.
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:tradingview/charting_library.git' into submodule path 'C:/coding/charting-library-tutorial/charting_library_clonned_data' failed
Failed to clone 'charting_library_clonned_data' a second time, aborting

What am I doing wrong here?

alex deralu
  • 569
  • 1
  • 3
  • 18
  • 2
    Does this answer your question? [Git error: "Host Key Verification Failed" when connecting to remote repository](https://stackoverflow.com/questions/13363553/git-error-host-key-verification-failed-when-connecting-to-remote-repository) – Matt Jun 07 '21 at 11:16
  • @Matt I checked out this answer before answering this question. I am not using SSH keys here, but still I ran ```ssh-keyscan -t rsa domain.com >> ~/.ssh/known_hosts ``` and it still did not work. – alex deralu Jun 07 '21 at 11:33
  • @Matt just to verify, can you please tell me what should be the "domain.com" in the above code for my case? – alex deralu Jun 07 '21 at 11:38
  • 2
    The referenced repository in [.gitmodules](https://github.com/tradingview/charting-library-tutorial/blob/master/.gitmodules) is using SSH. The domain in this case would be `github.com`. Did you remove the existing entry with `ssh-keygen -R github.com`? – Matt Jun 07 '21 at 11:43
  • Check your `.gitmodules` file, it contains the URL(s) that the `git submodule` command will try to connect to. When I use submodules, I try to use relative URLs in there, e.g., `url = ../otherrepo.git`, so that Git uses the same method to authenticate to the server as I did for the main repo, and so that whenever I move stuff from one server to another, as long as I move the submodules too, it all stays coherent. Of course, that only works if all your repos live on the same Git server. – joanis Jun 07 '21 at 12:00
  • @joanis I ran ```ssh-keygen -R github.com``` -> ```ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts``` ->```git submodule update --init --recursive``` it still gives me the same error. Is there any other command that I should put after this? – alex deralu Jun 07 '21 at 12:57
  • @Matt is that above comment fine? or should I add something else too? – alex deralu Jun 07 '21 at 14:34

0 Answers0