Get a local git repo up on an EC2 Instance.
Add yourself to the ssh auth agent, if you haven't already.
ssh-add path/to/your/EC2.pem
SSH into the remote directory, and create a barebones remote repo directory.
ssh [email protected]
mkdir repo-name.git && cd repo-name.git
git init --bare
cd repo-name
git init git add .
git commit -m "Initial git commit message"
git remote add origin [email protected]:/path/to/your/repo-name.git
git config --global remote.origin.receivepack "git receive-pack" # needed for aws ec2 stuff.
git push origin master
The origin url can be used for cloning too.
git clone [email protected]:/path/to/your/repo-name.git
(This guide was lifted from here, then modified slightly.)
It worked successfully but after pushing my website how can I view it?