GitHub
If you don’t yet have a GitHub account, you can create one at GitHub.
Create a Repository
Click the New button to create a new repository.
- Set a simple repository name, e.g.
python-gh-actions. - Optionally, add a description.
- Make the repository public.
- As of may 2024, GitHub Actions are only free for public repositories.
- Check “Add a README file”.
- Done!
Clone the Repository
Setting up SSH
First check if you already have a SSH key:
ls -al ~/.sshIf you see a file named id_rsa.pub, or similar, you already have a SSH key. If not, you can generate one:
ssh-keygen -t ed25519Copy the SSH key to your clipboard:
cat ~/.ssh/id_*.pubAdd the SSH key to your GitHub account:
- Go to your GitHub SSH settings.
- Add a title, e.g. “My laptop”.
- Paste the key into the “Key” field.
Cloning the Repository
- Get the repository URL by clicking the green “Code” button.
- Select the “SSH” tab and copy the URL.
- Clone the repository to your local machine:
# git clone ...# Replace <username> with your GitHub username, and the repo name if you changed itgit clone git@github.com:<username>/python-gh-actions.gitcd python-gh-actionsValidate that you have successfully cloned the repository:
cat README.md