Skip to main content

Command Palette

Search for a command to run...

Setting up GitHub

Part 1 of building a Rails 7 application

Updated
1 min read
Setting up GitHub
A

I am a web developer who has been in the industry since 1995. My current tech stack preference is Ruby on Rails with JavaScript. Originally from Australia but now living in Scotland.

Start by following the instructions on GitHub for registering a new account.

GitHub Sign Up

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.

image.png

Now create a new GitHub repository. In my case it is called catalogue_cleanser.

image.png

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"

Choosing a Repository License

Multiple GitHub Accounts on MacOS

Rails 7 Application

Part 1 of 32

In this series I'll be documenting my journey of building a brand new Rails 7 application. Please comment if you have suggestions on how I can improve any aspect, or provide alternatives.

Up next

Initializing a Rails 7 application with Postgres and TailwindCSS

Part 2 of building a Rails 7 application