When building the Celestial Bodies Database it instructs you to save your
universe.sql file in a public repository. I tried to do this with my github account but I am having trouble doing that. Am I supposed to use these commands:
git remote add origin firstname.lastname@example.org:*my account
git branch -M main
git push -u origin main
then select the ‘fingerprint’ option, and then enter the fingerprint number back into bash?
OR how do I save the universe.sql to a public repo?
BUMP, Can someone please help me with this. I am unable to save my work to my github repo.
I get an error when:
codeally@65538499e34a:~/project$ git push --set-upstream origin main
email@example.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
How do i fix this?
Issue resolved. I needed to create an ssh key in the VM and add it to my github account.
Glad to head you figured it out @gws. I would have told you to copy/paste the files.
It’s great that there is an article on this topic. Here are some additional steps that I followed after reading this:
- Create a new repository in Github
- On the CodeAlly side, follow these instructions to create & add the ssh-key Generating a new SSH key and adding it to the ssh-agent - GitHub Docs.
- Back in Github and in the newly create repository, click on the wheel Settings button.
- In Settings, select Deploy keys.
- In Deploy keys, click on the Add key button.
Paste the ssh-key generated in the VM into the deploy key. If you had trouble following the clip instruction, use less ~/.ssh/“your key pub” to get the key.
Save the key.
Get the ssh-key repository URL (as opposed to the https URL). See Quickly set up GitHub SSH example.
In CodeAlly, set this URL as a github remote repository. Ex: git remote add sshorigin “the ssh repository URL”.