1.本地生成公钥私钥与github的账号进行关联
[root@lglgee .ssh]# ssh-keygen -t rsa -C "myemail@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:k4ScpYiJpLs myemail@qq.com
The key's randomart image is:
+---[RSA 2048]----+
|+=B*. . |
|+=o = |
|= + o+= . |
|+. . .. . |
|*. oS |
|=o o + . |
|+... |
|oo |
|.o |
+----[SHA256]-----+
[root@lglgee .ssh]# ls
id_rsa id_rsa.pub known_hosts
2.接下来是克隆项目到本地,必须通过git clone的方式,如果直接下载master代码的话,是无法运行下面的git相关命令。
git clone git@github.com:google/earthenterprise.git
拷贝到内网服务器之后的操作:
git status ----查看仓库的现状,可以看到有很多修改和更新文件
git add -A ----把所有的修改添加到暂存区,添加之后,在git status看看现状,可以看到跟上次不一样;
git commit -m "20190807commit" ---提交到仓库,后面双引号是提交说明,提交说明不能为空
此时因为没有跟github用户关联,会出现警告信息
git config user.email "27383755@qq.com"
git config user.name "aganlian" ---因为是本地仓库,所以不需要globel参数
设置完毕用户信息之后,在运行一下
git commit -m "20190807commit"
此时再看一下现状
git status ---显示无文件需要提交,干净的工作区
git tag --- 现状仓库的所有标签,即所有版本
git checkout 5.3.0-891.12 ---按照上面列出的版本号,把仓库切换到某一个版本,可以多次使用checkout,在不同版本之间切换。
切换到某版本之后,可以开始编译这些源代码。
3.git checkout 到某一个版本后,就可以进行相关的编译和安装工作了。
GEE的编译和安装:Building Earth Enterprise Fusion and Server