To connect to GitHub, you better generate an ssh key and add it to your GitHub account. This saves you from entering your user name and password every time you interact with the GitHub repository.
Generate a new ssh key by following this instruction. Just push enter to all the prompts. You don't have to set a passphrase. You just have to generate the new key and do not have to add it to the ssh-agent.
ssh-keygen -t ed25519 -C "[email protected]"
cat ~/.ssh/id_ed25519.pub
ssh-ed25519 and ends with your email address. You need to copy the entire key.As the ssh key is generated, register the key to your GitHub account following this instruction.
kohei-kawaguchi/Economics on GitHub. Here, kohei-kawaguchi is the user name of the repository owner and Economics is the repository name. They can be different by owners and repositories.git clone [email protected]:kohei-kawaguchi/Economics.git
Economics at the folder where you run the command. In the following, I call this folder a project root folder or simply a project folder.File > Open Project and navigate to the cloned project folder and choose Economics.Rproj. Then, RStudio opens the project and sets the working directory in the project folder.Build > Clean and Install to make sure the project can be compiled properly.
git tab in RStudio. However, we do not use this, because the git functionality in RStudio is unstable. We use GitHub Desktop for managing the git repository.<aside> 💡 Configuration 3 only
</aside>
ap-northeast-1. This can be different by the project.