1. Maven配置阿里云镜像和配置jdk1.8编译项目
找到Maven的安装目录,在安装目录下找到conf->settings.xml,在该文件中找到<mirrors></mirrors>标签,在该标签内添加阿里云镜像:
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
接着找到<profiles></profiles>标签,在该内添加jdk1.8的配置:
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
2. 初始化配置git
2.1 下载git:
https://git-scm.com
2.2 配置git: 进入git bash(git的基本配置)
# 配置用户名
git config --global user.name "username"
# 配置邮箱
git config --global user.mail "username@email.com"
2.3 配置ssh免密登录(gitee或github同样的设置)
$ ssh-keygen -t rsa -C "username@mail.com"
连续3次回车
eg:
$ ssh-keygen -t rsa -C "enjoycode10@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Shawn/.ssh/id_rsa):
Created directory '/c/Users/Shawn/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Shawn/.ssh/id_rsa
Your public key has been saved in /c/Users/Shawn/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:o7sBw6bU2OvHeZi1p/ka81xIObc8m6MVGtcaufgTUQA enjoycode10@163.com
The key's randomart image is:
+---[RSA 3072]----+
| E... |
| . |
| . |
| = ..o |
| o B S = *.. |
| . o + ..o X.* |
| . ..o=o.+ O. |
| . *oo*.+o+ |
| ..oo+==.+o |
+----[SHA256]-----+
用户目录下会生产这样的文件
或者cat ~/.ssh/id_rsa.pub 查看完整的密钥内容
2.4 在gitee上配置ssh key
个人中心 》 设置 》SSH公钥 》添加标题,添加cat ~/.ssh/id_rsa.pub查到的公钥(完整内容)
2.5 验证
使用 ssh -T git@gitee.com 测试是否成功即可
3. 码云创建项目
3.1 创建仓库
3.2 克隆项目到 IDEA
转载请注明来源。