https://www.jianshu.com/p/f54053afecf2
<pre>
1.方法一
1.1 创建文件存储GIT用户名和密码
在%HOME%目录中,一般为C:\users\Administrator,也可以是你自己创建的系统用户名目录,反正都在C:\users\中。文件名为.git-credentials,由于在Window中不允许直接创建以"."开头的文件,所以需要借助git bash进行,打开git bash客户端,进行%HOME%目录,然后用touch创建文件 .git-credentials, 用vim编辑此文件,输入内容格式:
touch .git-credentials
vim .git-credentials
https://{username}:{password}@github.com
1.2 添加Git Config 内容
进入git bash终端, 输入如下命令:
git config --global credential.helper store
执行完后查看%HOME%目录下的.gitconfig文件,会多了一项:
[credential] helper = store
重新开启git bash会发现git push时不用再输入用户名和密码
2.方法二
2.1 添加环境变量
在windows中添加一个HOME环境变量,变量名:HOME,变量值: %USERPROFILE%
[图片上传失败...(image-57e1f7-1514458742915)]
2.2 创建git用户名和密码存储文件
进入%HOME%目录,新建一个名为"_netrc"的文件,文件中内容格式如下:
machine {git account name}.github.com
login your-username
password your-password
重新打开git bash即可,无需再输入用户名和密码
作者:鸟麦
链接:https://www.jianshu.com/p/f54053afecf2
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。</pre>
sonarqube的docker试用
2016年08月04日发布
-
赞
|
0 收藏
|
0
-
1.8k
次浏览
docker
docker pull sonarqube:lts-alpine
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 -e SONARQUBE_JDBC_USERNAME=sonar -e SONARQUBE_JDBC_PASSWORD=sonar sonarqube:lts-alpine
登录
http://192.168.99.100:9000/
admin/admin
maven配置
settings.xml
<settings>
<pluginGroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Optional URL to server. Default value is http://localhost:9000 -->
<sonar.host.url>
http://192.168.99.100:9000
</sonar.host.url>
</properties>
</profile>
</profiles>
</settings>
项目pom.xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.0.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
分析
mvn clean verify sonar:sonar -Dmaven.test.skip=true
网友评论