Save file in a public repository question

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*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?

Thank you!

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 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?

Thank you!

Issue resolved. I needed to create an ssh key in the VM and add it to my github account.

1 Like

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:

  1. Create a new repository in Github
  2. 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.
  3. Back in Github and in the newly create repository, click on the wheel Settings button.

  1. In Settings, select Deploy keys.


  1. In Deploy keys, click on the Add key button.

  1. 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.

  2. Save the key.

  3. Get the ssh-key repository URL (as opposed to the https URL). See Quickly set up GitHub SSH example.

  4. In CodeAlly, set this URL as a github remote repository. Ex: git remote add sshorigin “the ssh repository URL”.

1 Like