PS:因为git@ubuntu是普通用户,克隆的文件在本地需要创建文件夹,所以权限不够,需要sudo
git@ubuntu:/gitClone$ sudo git clone gitadmin@10.255.13.253:/home/wuzhang/work/teamwork
Cloning into 'teamwork'...
gitadmin@10.255.13.253's password:
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 10 (delta 1), reused 10 (delta 1)
Receiving objects: 100% (10/10), done.
Resolving deltas: 100% (1/1), done.
git@ubuntu:/gitClonelsteamworkgit@ubuntu:/gitClone cd teamwork/
显示一下克隆的文件:
git@ubuntu:/gitClone/teamwork$ ls
1 1.c 1.c~ hello hello.txt
执行下我编译过得1.c文件
git@ubuntu:/gitClone/teamwork$ ./1
Git Server is OK!
git@ubuntu:/gitClone/teamwork$
克隆完成,服务器环境搭建完成!
Windows 下测试:
打开winidows本地文件,ok!
接下来要搭建一个可以方便访问的Web环境了,下次见!
GitHub 教程系列文章: