The document outlines the steps to clone a remote GitHub repository to a local machine using an EC2 instance on AWS and how to push additional files back to the remote repository. It includes instructions for creating an EC2 instance, cloning the repository, modifying files, initializing Git, and pushing changes using a Personal Access Token. Additionally, it details the process for generating a Personal Access Token on GitHub for authentication purposes.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views1 page
Skill 1
The document outlines the steps to clone a remote GitHub repository to a local machine using an EC2 instance on AWS and how to push additional files back to the remote repository. It includes instructions for creating an EC2 instance, cloning the repository, modifying files, initializing Git, and pushing changes using a Personal Access Token. Additionally, it details the process for generating a Personal Access Token on GitHub for authentication purposes.
3.vi example.txt type some text and press esc :wq! 4.git init
5.git add .
6.git commit -m "message"
7.git remote add aliasname
https://<token>@github.com/username/repo
note- see token generation procedure to use above command
8.git push -u aliasname main
Token generation
Generate a Personal Access Token (PAT) on GitHub:
1.Go to GitHub and log in to your account. 2.In the upper-right corner of the page, click your profile picture and then click Settings. 3.In the left sidebar, bottom of page click Developer settings. 4.Under Developer settings, click Personal access tokens. click on Tokens(classic) Click Generate new token . Give your token a name (e.g., Git operations token). Select the scopes (permissions) you need: Click Generate token. 5.Copy the token. This is your only chance to copy it — GitHub will not show it to you again.