在mac下配置Git服务器
1、jdk
下载地址:jdk 安装
2、git
下载地址:git 压缩包
3、配置
打开文件 ~/gitblit-1.8.0/data/defaults.properties
修改本地 Git 服务器仓库根目录:
git.repositoriesFolder = gitServer
修改 HTTP 协议端口号:
server.httpPort = 8090
打开mac终端,跳转到git解压的根目录,使用cd命令
cd /Users/zmx/git/gitblit-1.8.0
启动 gitblit 服务:
./gitblit.sh
运行成功输出如下:
Last login: Wed Apr 25 10:58:47 on ttys000 zhangmeixiangdeiMac:~ zmx$ cd /Users/zmx/git/gitblit-1.8.0 zhangmeixiangdeiMac:gitblit-1.8.0 zmx$ ./gitblit.sh 2018-04-25 11:23:05 [INFO ] _____ _ _ _ _ _ _ | __ \(_)| | | | | |(_)| | | | \/ _ | |_ | |__ | | _ | |_ | | __ | || __|| '_ \ | || || __| http://gitblit.com | |_\ \| || |_ | |_) || || || |_ @gitblit \____/|_| \__||_.__/ |_||_| \__| 1.8.0 2018-04-25 11:23:05 [INFO ] Running on Mac OS X (10.13.3) 2018-04-25 11:23:05 [INFO ] Logging initialized @299ms 2018-04-25 11:23:05 [INFO ] Using JCE Standard Encryption Policy files, encryption key lengths will be limited 2018-04-25 11:23:05 [INFO ] Setting up HTTPS transport on port 8443 2018-04-25 11:23:05 [INFO ] certificate alias = localhost 2018-04-25 11:23:05 [INFO ] keyStorePath = /Users/zmx/git/gitblit-1.8.0/data/serverKeyStore.jks 2018-04-25 11:23:05 [INFO ] trustStorePath = /Users/zmx/git/gitblit-1.8.0/data/serverTrustStore.jks 2018-04-25 11:23:05 [INFO ] crlPath = /Users/zmx/git/gitblit-1.8.0/data/certs/caRevocationList.crl 2018-04-25 11:23:05 [INFO ] Setting up HTTP transport on port 8090 2018-04-25 11:23:05 [INFO ] Shutdown Monitor listening on port 8081 2018-04-25 11:23:05 [INFO ] jetty-9.2.13.v20150730 2018-04-25 11:23:06 [INFO ] NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IRuntimeManager]---- 2018-04-25 11:23:06 [INFO ] Basefolder : /Users/zmx/git/gitblit-1.8.0/data 2018-04-25 11:23:06 [INFO ] Settings : /Users/zmx/git/gitblit-1.8.0/data/gitblit.properties 2018-04-25 11:23:06 [INFO ] JVM timezone: Asia/Shanghai (CST +0800) 2018-04-25 11:23:06 [INFO ] App timezone: Asia/Shanghai (CST +0800) 2018-04-25 11:23:06 [INFO ] JVM locale : zh_CN 2018-04-25 11:23:06 [INFO ] App locale : <client> 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.INotificationManager]---- 2018-04-25 11:23:06 [WARN ] Mail service disabled. 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IUserManager]---- 2018-04-25 11:23:06 [INFO ] ConfigUserService(/Users/zmx/git/gitblit-1.8.0/data/users.conf) 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IAuthenticationManager]---- 2018-04-25 11:23:06 [INFO ] External authentication disabled. 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.transport.ssh.IPublicKeyManager]---- 2018-04-25 11:23:06 [INFO ] FileKeyManager (/Users/zmx/git/gitblit-1.8.0/data/ssh) 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IRepositoryManager]---- 2018-04-25 11:23:06 [INFO ] Repositories folder : /Users/zmx/git/gitblit-1.8.0/data/gitServer 2018-04-25 11:23:06 [INFO ] Identifying repositories... 2018-04-25 11:23:06 [INFO ] 0 repositories identified with calculated folder sizes in 11 msecs 2018-04-25 11:23:06 [INFO ] Lucene will process indexed branches every 2 minutes. 2018-04-25 11:23:06 [INFO ] Garbage Collector (GC) is disabled. 2018-04-25 11:23:06 [INFO ] Mirror service is disabled. 2018-04-25 11:23:06 [INFO ] Alias 'UTF8', UTF-9 & UTF-18 encodings as UTF-8 in JGit 2018-04-25 11:23:06 [INFO ] Preparing 14 day commit cache. please wait... 2018-04-25 11:23:06 [INFO ] 0 repositories identified with calculated folder sizes in 1 msecs 2018-04-25 11:23:06 [INFO ] built 14 day commit cache of 0 commits across 0 repositories in 1 msecs 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IProjectManager]---- 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IFederationManager]---- 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.tickets.ITicketService]---- 2018-04-25 11:23:06 [INFO ] NullTicketService started 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IGitblit]---- 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IServicesManager]---- 2018-04-25 11:23:06 [INFO ] Federation passphrase is blank! This server can not be PULLED from. 2018-04-25 11:23:06 [INFO ] Fanout PubSub service is disabled. 2018-04-25 11:23:06 [INFO ] Git Daemon is listening on 0.0.0.0:9418 2018-04-25 11:23:06 [INFO ] SSH Daemon (NIO2) is listening on 0.0.0.0:29418 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IFilestoreManager]---- 2018-04-25 11:23:06 [INFO ] No filestore metadata file found 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] ----[com.gitblit.manager.IPluginManager]---- 2018-04-25 11:23:06 [INFO ] PF4J version 1.8.0 in 'deployment' mode 2018-04-25 11:23:06 [INFO ] Enabled plugins: [] 2018-04-25 11:23:06 [INFO ] Disabled plugins: [] 2018-04-25 11:23:06 [INFO ] No plugins 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] All managers started. 2018-04-25 11:23:06 [INFO ] 2018-04-25 11:23:06 [INFO ] [GitBlitWebApp] init: Wicket core library initializer 2018-04-25 11:23:06 [INFO ] [GitBlitWebApp] init: Wicket extensions initializer 2018-04-25 11:23:06 [INFO ] [GitBlitWebApp] Started Wicket version 1.4.22 in deployment mode 2018-04-25 11:23:06 [INFO ] Started o.e.j.w.WebAppContext@526fa874{/,file:/Users/zmx/git/gitblit-1.8.0/data/temp/webapp/,AVAILABLE}{file:/Users/zmx/git/gitblit-1.8.0/gitblit.jar} 2018-04-25 11:23:07 [INFO ] Started ServerConnector@71cb58b3{SSL-HTTP/1.1}{0.0.0.0:8443} 2018-04-25 11:23:07 [INFO ] Started ServerConnector@3eb6e580{HTTP/1.1}{0.0.0.0:8090} 2018-04-25 11:23:07 [INFO ] Started @2723ms
用服务器 IP + 端口号来访问:

部署完毕!

浙公网安备 33010602011771号