0% 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.

Uploaded by

bhanuprasadg66
Copyright
© © All Rights Reserved
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% 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.

Uploaded by

bhanuprasadg66
Copyright
© © All Rights Reserved
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
You are on page 1/ 1

make a copy of remote repository in local machine and push some more files int

remote repository

1.Create EC2 instance in AWS console


2.select created EC2 instance and click connect

IN UBUNTU

1.git clone "https://github.com/LavanyaSusanna/myprojectrepo.git"

2.cd myprojectrepo

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.

You might also like