Make sure you have docker installed on your machine and run
docker login ghcr.io — username <username>
After pressing ENTER, you are prompted for a password
Password:
Enter the Personal access token from your github account here https://github.com/settings/tokens and you should see the message
Login Succeeded
After successful login, you can pull and push your images to/from your local machine