Start by following the instructions on GitHub for registering a new account.
The next step is to create an SSH key which can be used to access your remote repository.
% ssh-keygen -t ed25519 -C "your_email@example.com"
The SSH key needs to be registered within GitHub.
Now create a new GitHub repository. In my case it is called catalogue_cleanser
.
Configure ssh locally by editing ~/.ssh/config
. This will allow access to your repository using the SSH key we just created (mine is called id_github
).
Host github.com-andrewfoster73
HostName github.com
User git
IdentityFile ~/.ssh/id_github
IdentitiesOnly yes
The next step is to clone the new git repository on your local machine.
% cd rails
% git clone git@github.com-andrewfoster73:andrewfoster73/catalogue_cleanser.git catalogue_cleanser
After that we need to inform git locally which user account will be associated with our repository. In this case we'll make it a local configuration so it applies only to our new repository.
% git config user.email "github@bluemoon.com.au"
% git config user.name "Andrew Foster"