有关设置git的在Amazon EC2云计算虚拟的问题 [英] Dummy questions about setting up git on amazon cloud ec2

查看:146
本文介绍了有关设置git的在Amazon EC2云计算虚拟的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,道歉,我可能会在这里扔假的问题。这将是很好,如果你可以点,我应该何去何从的方向。

first of all, apologize for dummy questions that I might throw here. It would be nice if you could point the directions where should I go from here.

我是全新的版本控制(以及GIT)和云系统。然而,它来到了,我要开发的AWS EC2实例PHP的基于Web的应用程序,并codeS contributable为未来的发展点。

I'm totally new to version control(as well as git) and cloud system. However, it came to the point that I have to develop php web based application on AWS EC2 instance and make codes contributable for future developers.

我并成功创建运行PHP / MySQL的EC2实例和地图与弹性IP域。因此,该网站是现在可以通过80端口向公众开放。

I did successfully create EC2 instance that run PHP/MySQL and map the domain with Elastic IP. So the website is now publicly accessible via port 80.

我还用 $ sudo的百胜安装的git 和的ConfigEd user.name和user.email

I also installed git using $sudo yum install git and configed user.name and user.email

我的话,请访问网站的根文件夹(如的public_html)和run'的git的init ,这创造了折git的,我再使用添加文件 git的补充。,并承诺 git的承诺-m最初的上传

I then, go to root folder of the website (e.g. public_html) and run ‘git init’ which create the fold ".git" and I then add file using "git add ." and commit "git commit -m ‘initial upload’"

时,正确的方式去?难道是确定有该项目的文件夹坐在/的public_html(其中任何人的访问)。

Is that the right way to go? Would it be ok to have the project folder sitting on /public_html (where accessible from anyone).

如果上面是好的,那么我应该在哪里何去何从? 我想有git的服务器上EC2允许开发人员从本地机器(如Eclipse的),同时能够保留备份和比较不同的codeS。连接运行

If above is ok, then where should I go from here? I would like to have git server running on EC2 that allow developers to connect from their local machines (e.g. Eclipse) while being able to keep the backup and compare the different between codes.

什么细节我想给开发者,以便他们能够连接到的Git服务器和工作项目?

What detail do I suppose to give developers so that they can connect to git server and working on project?

我快速的方向或几个关键字,做更多的研究,将有助于。

I quick direction or few keywords to do more research would help.

推荐答案

看<一href="http://shirtdev.word$p$pss.com/2011/05/04/setting-up-a-git-repository-on-an-amazon-ec2-instance/">here有关设置git的在Amazon EC2

look here for more information on setting up git on amazon ec2

要允许开发人员使用你的Git,你只需要给他们git的服务器的URL。

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

直接引自该网站即时链接到。

Direct quote from the site i'm linking to.

首先,您需要将您的EC2的身份加入到SSH认证代理,这prevents问题混帐后,即得到错误权限被拒绝(公钥)。努力做一个混帐推时,到EC2资源库。

"First and foremost, you need to add your EC2 identity to the ssh authentication agent. This prevents problems with git later, namely getting the error "Permission denied (publickey)." when trying to do a git push to the EC2 repository.

ssh-add path/to/privateEC2key.pem

现在你可以继续创建的EC2实例的Git仓库。

Now you can go ahead and create the git repository on the EC2 instance.

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

所以没有太多的事情在这里,我们所要做的就是创建一个空库,然后离开。现在,在本地机器上,你做类似如下:

So not much going on here, all we do is create an empty repository and then leave. Now, on the local machine, you do something like the 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

在'混帐配置命令修复,我发现必须能够推到EC2资源库。

The ‘git config’ command is a fix that I found necessary to be able to push to the EC2 repository."

这篇关于有关设置git的在Amazon EC2云计算虚拟的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆