Git Version Control
First, despite the fact that you are accessing CoCalc through the internet, you are actually working in a highly restricted environment. Processes running inside a free project are not allowed to directly access the internet. (We do not allow such access for free users, since when we did, malicious users launched attacks on other computers from CoCalc.) Enable internet access by adding the “internet access” quota. See Project Upgrades.
To access private repositories or to push your new commits, you need to create an SSH key and explicitly allow that account/key access to access the remote repository.
Create an SSH key public/private key pair by typing the command ssh-keygen. (consult Setup SSH Keys for more information)
Copy the content of
.ssh/id_rsa.pub(could be named similarly, but has the ending
.pub) to GitHub’s setting for setting up an additional key. To open that file quickly, you can run this in the Terminal:
If necessary, navigate to a different directory.
Use Git as usual.
Git graphical desktop emulator
Host a Git repository in CoCalc
You can create a Git repository hosted inside a CoCalc project, and then access that repository remotely from any client computer that has SSH Access to the project enabled. See “Hosting a git repository on CoCalc” in the blog article, Using SSH with CoCalc.