linux - Dummy questions about setting up git on amazon cloud ec2 -


first of all, apologize dummy questions might throw here. nice if point directions should go here.

i'm totally new version control(as git) , cloud system. however, came point have develop php web based application on aws ec2 instance , make codes contributable future developers.

i did create ec2 instance run php/mysql , map domain elastic ip. website publicly accessible via port 80.

i installed git using $sudo yum install git , configed user.name , user.email

i then, go root folder of website (e.g. public_html) , run ‘git init’ create fold “.git” , add file using “git add .” , commit “git commit -m ‘initial upload’

is right way go? ok have project folder sitting on /public_html (where accessible anyone).

if above ok, should go here? have git server running on ec2 allow developers connect local machines (e.g. eclipse) while being able keep backup , compare different between codes.

what detail suppose give developers can connect git server , working on project?

i quick direction or few keywords more research help.

look here more information on setting git on amazon ec2

to allow developers use git, need give them git server url.

direct quote site i'm linking to.

"first , foremost, need add ec2 identity ssh authentication agent. prevents problems git later, namely getting error “permission denied (publickey).” when trying git push ec2 repository.

ssh-add path/to/privateec2key.pem 

now can go ahead , create git repository on ec2 instance.

ssh username@hostname.com  mkdir the_project.git  cd the_project.git  git init --bare 

so not going on here, create empty repository , leave. now, on local machine, following:

cd the_project  git init git add .  git commit -m "initial git commit message"  git remote add origin username@hostname.com:the_project.git  git config --global remote.origin.receivepack "git receive-pack"  git push origin master 

the ‘git config’ command fix found necessary able push ec2 repository."


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -