为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

Gitblit搭建及Git协作开发流程参考

2017-08-10 34页 doc 2MB 177阅读

用户头像

is_099060

暂无简介

举报
Gitblit搭建及Git协作开发流程参考Gitblit搭建及Git协作开发流程版本:v1.0(2015年3月20日)作者:南瓜剪子1.概述目前主流的是git作为自己代码管理,但是采用github需要付费才能够使用,如果不付费,代码需要公开。创业团队及小型开发团队都有必要搭建自己的代码服务器,自己摸索需要一定的时间,会赶不及项目进度。在此作者把自己的经验作为文档写下来,方便互联网各位创业者参考,能很快的搭建自己所需要的代码服务器。同时作者也把最基本的开发流程,代码提交,代码上传,代码merge等流程用命令写出,方便大家参考。作者自己的团队开发以Maven+Java为主...
Gitblit搭建及Git协作开发流程参考
Gitblit搭建及Git协作开发流程版本:v1.0(2015年3月20日)作者:南瓜剪子1.概述目前主流的是git作为自己代码管理,但是采用github需要付费才能够使用,如果不付费,代码需要公开。创业团队及小型开发团队都有必要搭建自己的代码服务器,自己摸索需要一定的时间,会赶不及项目进度。在此作者把自己的经验作为文档写下来,方便互联网各位创业者参考,能很快的搭建自己所需要的代码服务器。同时作者也把最基本的开发流程,代码提交,代码上传,代码merge等流程用命令写出,方便大家参考。作者自己的团队开发以Maven+Java为主,使用eclipse作为开发工具,相关部分在此文档中都有详细的描述。文档中使用的工具版本如下jdk1.8.0_73Gitblit1.7.1EclipseMARS.1PortableGit2.7.1Apache-maven-3.3.9注意:由于互联网技术日新月异,以后工具如有更新,流程也许会变化,所以本文档中流程只作为参考。并请准备一台Windows机器,并且在你的局域网内,开发者能够访问注意:如果你只是一个开发者,不需要关心Gitblit代码服务器搭建,请跳过下面章节第3章Gitblit服务器搭建第4章配置Gitblit用户第5章创建第一个Gitblit版本库第7章项目管理者上传项目最初始代码这几张是有关Gitblit部分,主要是代码管理员需要学习服务器管理。开发人员请从后面相关部分学习,后面类容依然精彩,会告诉你怎么下载代码,构建工程,还有上传代码,更新代码。2.安装JDK安装JDK这个过程我就不再过多描述访问http://www.oracle.com/technetwork/java/javase/downloads下载最新JDK,并按操作安装安装完毕后最好设置环境变量JAVA_HOME及PATH新建JAVA_HOME=C:\ProgramFiles\Java\jdk1.8.0_73(你的JDK安装目录,请核对你自己目录及版本)并把(;%JAVA_HOME%\bin;)加入到PATH大致流程如下图所示3.Gitblit服务器搭建访问地址:http://gitblit.com/下载最新的Gitblitwindows版本,由于小型团队一般以windows机器为主,在这里只介绍windows版本的搭建Step1)下载gitblit-1.7.1.zipStep2)解压到D:\open_source\gitblit-1.7.1Step3)创建一个目录,用来存放代码库:D:/GitRepositoiesStep4)修改data目录下的gitblit.properties(D:\open_source\gitblit-1.7.1\data\gitblit.properties)加入以下红色内容##GITBLIT.PROPERTIES##Defineyourcustomsettingsinthisfileand/orincludesettingsdefinedin#otherpropertiesfiles.##IncludeGitblit's'defaults.properties'withinyourconfiguration.##NOTE:Gitblitwillnotautomaticallyreload"included"properties.Gitblit#onlywatchesthe'gitblit.properties'fileformodifications.##Pathsmayberelativetothe${baseFolder}ortheymaybeabsolute.##COMMA-DELIMITED#SINCE1.7.0include=defaults.properties##Defineyouroverridesorcustomsettingsbelow##Basefolderforrepositories.#Thisfoldermaycontainbareandnon-barerepositoriesbutGitblitwillonly#allowyoutopushtobarerepositories.#UseforwardslashesevenonWindows!!#e.g.c:/gitrepos##SINCE0.5.0#RESTARTREQUIRED#BASEFOLDERgit.repositoriesFolder=D:/GitRepositoies#Standardhttpporttoserve.<=0disablesthisconnector.#OnUnix/Linuxsystems,ports<1024requirerootpermissions.#Recommendedvalue:80or8080##SINCE0.5.0#RESTARTREQUIREDserver.httpPort=1000#Secure/SSLhttpsporttoserve.<=0disablesthisconnector.#OnUnix/Linuxsystems,ports<1024requirerootpermissions.#Recommendedvalue:443or8443##SINCE0.5.0#RESTARTREQUIREDserver.httpsPort=1001#SpecifytheinterfaceforJettytobindthestandardconnector.#Youmayspecifyaniporanemptyvaluetobindtoallinterfaces.#SpecifyinglocalhostwillresultinGitblitONLYlisteningtorequeststo#localhost.##SINCE0.5.0#RESTARTREQUIREDserver.httpBindInterface=#SpecifytheinterfaceforJettytobindthesecureconnector.#Youmayspecifyaniporanemptyvaluetobindtoallinterfaces.#SpecifyinglocalhostwillresultinGitblitONLYlisteningtorequeststo#localhost.##SINCE0.5.0#RESTARTREQUIREDserver.httpsBindInterface=注意:红色部分属性都是从同目录下defaults.properties拷贝过来,只是采用了我们自己的配置,其中为了安全及便利,我没有没有使用端口80及443,用1000及1001代替(因为我团队的机器80端口用作其他用途了)。并把仓库设置为Step3中的目录。Step5)修改D:\open_source\gitblit-1.7.1\installService.cmd下面红色部分@REMInstallGitblitasaWindowsservice.@REMgitblitw.exe(prunmgr.exe)isaGUIapplicationformonitoring@REMandconfiguringtheGitblitprocrunservice.@REM@REMBydefaultthistoollaunchestheservicepropertiesdialog@REMbutitalsohassomeotherveryusefulfunctionality.@REM@REMhttp://commons.apache.org/daemon/procrun.html@REMarch=x86,amd64,oria32SETARCH=x86由于我的机器是x86-32位的,所以我改为x86,请对照你机器的架构选择如果你的机器是64位,请选择amd64Step6)安装windows服务用管理员权限打开CMD命令提示符,如下图所示然后再命令行中输入一下命令C:\Windows\system32>d:D:\>cdD:\open_source\gitblit-1.7.1D:\open_source\gitblit-1.7.1>installServiceStep7)检查windows服务开始菜单“运行”中,输入services.msc并检查gitblit服务是否成功安装,由于开发团队每天都在用,确保为自动模式,每次windows启动都自动启动右键点击gitblit,并把服务启动起来注意:如果要删除服务,请直接运行D:\open_source\gitblit-1.7.1下面的uninstallService.cmdStep8)有可能服务器起来后,局域网其他机器无法访问,只能在本机浏览器中打开,这是由于防火墙的设置,你必须人工设置防火强规则。打开“控制面板”->“管理工具”->“高级安全Windows防火墙”由于我演示用的机器是windows10,也许名字会不对,请点击“管理工具”里面的有关“防火墙”选项就行如下图所示:然后“新建规则”,选择“程序”然后选择程序为D:\open_source\gitblit-1.7.1\x86\gitblit.exe注意这里”x86”是你在step5)中选择的架构然后点下一步然后点下一步:点下一步:然后会看到有下面一条Step8)然后可以在IE中输入http://192.168.1.3:1000/其中IP地址换成你服务器的地址,注意,这里我们使用端口为1000,在前面gitblit.properties里面配置Gitblit安装完毕4.配置Gitblit用户用IE登陆系统:http://192.168.1.3:1000/Step1)用管理员账号登录确实用户名/密码:admin/adminStep2)修改管理员账户密码Step3)添加用户为你团队中的开发人员创建用户,只有授权用户才能进行相关操作然后点击添加用户然后填入成员基本信息,点击保存然后把用户名及初始密码发送给团队成员,让他们登陆http://192.168.1.3:1000/进去修改密码Step4)创建项目组也许你的创业团队有好几个项目,每个项目都由不同的人开发,你可以为每个项目创建个团队。然后点击右上交“添加团队”并填写以下信息:例如我有一个项目名称叫“阿尔法猫”然后选择团队成员,当前只有我一个,也可以选择多个,如下图其他有关权限部分可以先不用关心,熟悉后请自行阅读http://gitblit.com/中文档5.创建第一个Gitblit版本库:阿尔法猫Step1)使用系统管理员账号登陆,并点击“创建版本库”Step2)然后按要求填入以下信息可以给项目分组,那么在名称哪里填写:ai/alpha-mao示项目alpha-mao属于ai分组,对于项目名称我们一般采用全小写,中间用分隔符“-”分离单词注意,为了保证代码的安全,我们选择第四个:限制查看,克隆及推送,只有加入项目组的人才能够查看项目。不像github,匿名用户可以查看克隆开源代码,一般创业团队的代码都是保密。其他信息可以不用填写,下面会告诉你怎么推送新代码到服务器。然后点击下面“创建”,Step3)设置项目权限当项目创建后,点击版本库又上角的“编辑”按钮然后设置团队及用户权限注意:请一定要点击“添加”按钮添加成功后,点击保存按钮注意,团队权限只有能够查看克隆推送的权限,但是没有创建,修改分支(branch)的权限我们这里设置了一个项目管理员:他除了有查看克隆推送的权限,还有创建分支的权限。在后面我们会看到lan.zhou这个用户能够直接在服务器上创建dev分支。到此我们创建了一个新的版本库,下面等待lan.zhou这个用户上传最初始的代码,然后团队里面的别人就可以克隆使用。6.下载最新的git工具并安装访问https://git-scm.com/download/win下载最新的git工具一般“32-bitGitforWindowsPortable”就行,一般国外服务器比较难下载,可以找国内镜像。安装步骤:step1)解压PortableGit-2.7.0-32-bit.7z.exestep2)按下图把bin目录(;D:\ProgramFiles\PortableGit-2.7.0-32-bit\bin)加在系统环境变量PATH下step3)打开一个cmd(命令提示符)运行下列命令gitconfig--globaluser.email"nanguajianzi@163.com"gitconfig--globaluser.name"lan.zhou"注意:请把红色的用户名换成你自己的登陆名(详见第一章)然后用下列命令检查是否配置成功:gitconfig--listcore.symlinks=falsecore.autocrlf=truecolor.diff=autocolor.status=autocolor.branch=autocolor.interactive=truepack.packsizelimit=2ghelp.format=htmlhttp.sslcainfo=/ssl/certs/ca-bundle.crtdiff.astextplain.textconv=astextplainrebase.autosquash=trueuser.name=lan.zhouuser.email=nanguajianzi@163.comcore.editor='C:/ProgramFiles/Notepad++/notepad++.exe'-multiInst-notabbar-nosession-noPlugin运行完上面两个config命令,在你的windows用户目录下(C:\Users\登陆用户名)就会生成一个文件.gitconfig里面包含下面内容:[user] email=nanguajianzi@163.com name=lan.zhou7.项目管理者上传项目最初始代码项目管理者请准备最初的一个项目,里面包含一些基本代码请参考下面我准备的例子下面进行本地的准备Step1)把上面文件点击右键“保存到文件”,然后解压到文件夹,比如D:\git\alpha-maoStep2)打开一个windows命令提示符,运行下列命令C:\Users\apple>d:D:\>cdD:\git\alpha-mao进入项目目录Step3)进行git初始化D:\git\alpha-mao>gitinit初始化空的Git版本库于E:/apple/Documents/git/alpha-mao/.git/Step4)把文件加入版本D:\git\alpha-mao>gitadd.gitignoreD:\git\alpha-mao>gitaddLICENSED:\git\alpha-mao>gitaddREADME.mdD:\git\alpha-mao>gitaddpom.xmlD:\git\alpha-mao>gitaddsrc/Step5)第一次commitD:\git\alpha-mao>gitcommit-m"firstcommit"到此,项目在你本地已经准备好了,但是还没有上传到建立好的Gitblit服务器。下面我们上传代码Step1)查看你的上传地址,用项目管理者(前面建立的用户:lan.zhou,并不是系统管理员admin)登陆http://192.168.1.3:1000Step2)查看刚才建立的新版本库点击图中红圈标出的“复制到剪贴板”这个就是用户lan.zhou对应的git服务器地址Step3)上传代码在刚才的命令行中运行D:\git\alpha-mao>gitremoteaddoriginssh://lan.zhou@192.168.1.3:29418/ai/alpha-mao.gitD:\git\alpha-mao>gitpush-uoriginmasterTheauthenticityofhost'[192.168.1.3]:29418([192.168.1.3]:29418)'can'tbeestablished.RSAkeyfingerprintisSHA256:yQE8FoZXgbMUR1ou9zl+CKLE9xqM1zwy09wU33A4CeM.Areyousureyouwanttocontinueconnecting(yes/no)?yesWarning:Permanentlyadded'[192.168.1.3]:29418'(RSA)tothelistofknownhosts.PasswordauthenticationPassword:Countingobjects:19,done.Deltacompressionusingupto4threads.Compressingobjects:100%(9/9),done.Writingobjects:100%(19/19),5.60KiB|0bytes/s,done.Total19(delta0),reused0(delta0)remote:Updatingreferences:100%(1/1)Tossh://lan.zhou@192.168.1.3:29418/ai/alpha-mao.git*[newbranch]master->master分支master设置为跟踪来自origin的远程分支master。在上图红色的部分先输入:yes,然后再输入你在Gitblit上设置的密码到此,代码已经上传到服务器Step4)登陆到Gitblit可以看到相关代码下面为了项目开发,我们一般务必要做两个事请Step1)创建初始tag,并上传到服务器D:\git\alpha-mao>gittag-av0.1-m"initialversion"D:\git\alpha-mao>gitpushoriginv0.1然后你在http://192.168.1.3:1000上能够看到v0.1这个tagStep2)创建服务器的dev分支一般master分支为稳定代码,小型团队平常开发一般在另一个分子dev上进行我们必须在远端Gitblit服务器上创建dev分支。由于Gitblit权限控制,只有授权的人才能创建分子,详见第4章配置Gitblit用户。在这里lan.zhou这个用户拥有这个权限运行下列命令在远端Gitblit服务器创建dev分支:D:\git\alpha-mao>gitpushoriginmaster:devStep3)用下列命令查看分支查看本地分支:D:\git\alpha-mao>gitbranch*master查看远端分支:D:\git\alpha-mao>gitbranch-rorigin/devorigin/masterGit环境搭建完毕,下面开始进入第二部分,开发部分8.本地开发环境:eclipse请到地址:http://www.eclipse.org/downloads/下载最新版本的:EclipseIDEforJavaEEDevelopers然后直接解压缩,右键点击里面的“eclipse.exe”在桌面创建快捷方式,以后在桌面直接点击就可运行。在本文中我们使用MARS.1版本9.配置eclipse的git功能步骤Step1)点击eclipse下列菜单Step2)进入git配置选项卡Step3)在上图中的location,点击Open,然后选中你的git配置文件:C:\Users\apple\.gitconfig注意:其中apple是你的机器用户名Step4),检查你的用户名与邮箱是否正确10.Eclipse中配置mavenStep1)下载mavenhttp://maven.apache.org/download.cgi比如:apache-maven-3.3.9-bin.tar.gzStep2)同样解压后直接使用同时把bin目录(;D:\ProgramFiles\apache-maven-3.3.9\bin)加入PATH目录Step3)设置eclipse然后把刚才解压的目录加入Step4)选择配置文件,一定要选择你解压的maven目录下D:\ProgramFiles\apache-maven-3.3.3\conf\settings.xmlStep5)更新配置文件在文件D:\ProgramFiles\apache-maven-3.3.3\conf\settings.xml中加入下列红色的语句<mirrors><!--mirror|Specifiesarepositorymirrorsitetouseinsteadofagivenrepository.Therepositorythat|thismirrorserveshasanIDthatmatchesthemirrorOfelementofthismirror.IDsareused|forinheritanceanddirectlookuppurposes,andmustbeuniqueacrossthesetofmirrors.|<mirror><id>mirrorId</id><mirrorOf>repositoryId</mirrorOf><name>HumanReadableNameforthisMirror.</name><url>http://my.repository.com/repo/path</url></mirror>--> <mirror><id>CN</id><name>OSChinaCentral</name><url>http://maven.oschina.net/content/groups/public/</url><mirrorOf>central</mirrorOf></mirror></mirrors>在这里我们引入了中国区的maven库,可以极大提高你的获取速度。同时注意,你可以选择另外的目录作为maven库<localRepository>E:\apple\Documents\mvn_repo</localRepository>这个目录可能会很大,选择合适的磁盘存放11.团队其他成员在服务器端查看工程团队其他成员,这里我依然还是已自己(lan.zhou)为例,但是这里可以是属于项目阿尔法猫团队其他任何成员。请用浏览器访问地址:http://192.168.1.3:1000/Step1)请点击下面的阿尔法猫项目Step2)请取得项目的地址,点击下图中红色的标记出来的“复制到剪贴板”你同时会看到我已经新建了两个分支:master(主分支,用来存储当前稳定的代码)dev(开发分支,我们平时每天用来提交代码的分支,如果多人同时提交,可能需要merge)注意:不允许直接向master提交任何代码,只有管理员(余强)才能整合dev代码到master同时你还会看到我已经建立一个第一个版本标签v0.1,这是架构代码我们将会很快开发v1.0版本12.团队其他成员第一次下载代码Step1)在你的电脑上建立一个目录,比如E:\apple\Documents\gitStep2)打开一个命令行cmd,并运行下列两个命令C:\Users\apple>e:E:\>cdapple\Documents\git进入E:\apple\Documents\gitStep3)接着运行下列命令E:\apple\Documents\git>gitclonessh://lan.zhou@192.168.1.3:29418/ai/alpha-mao.git注意:真个连接是你在上面章节中step2中拷贝得到的链接,请完整复制,不用使用别人的链接,里面包含你的用户名然后进入项目目录E:\apple\Documents\git>cdalpha-maoStep4)可以熟悉简单的git命令>gitstatus(查看当前你修改后还没有提交的代码)OnbranchmasterYourbranchisup-to-datewith'origin/master'.nothingtocommit,workingdirectoryclean>gitbranch(查看你本地的分支)*master>gitbranch–r(查看远端服务器的分支)origin/HEAD->origin/masterorigin/devorigin/master注意,在服务器中我们已经有了origin/dev分支,我们将用这个分支进行开发Step5)创建你自己的本地开发分支比如你分配到的任务是feature1,或者你修改bug5540你可以在你的本地创建名字为feature1或者bug5540的分支但是对于我们一般代码开发,可以统一使用localdev>gitbranchlocaldev然后可以查看新建的localdev分支>gitbranch(查看你本地的分支)localdev*master但是当前的工作分支仍然是master,前面有一个*号Step6)checkout当前的localdev分支>gitcheckoutlocaldevSwitchedtobranch'localdev'>gitbranch(查看你本地的分支)*localdevMasterStep7)mergeremotedev分支到本地localdev分支>gitmergeorigin/dev13.eclipse导入工程下面打开eclipse,导入工程Step1),选择importStep2)选择“ExistingMavenProjects”Step3)选择你在第6章中git下载的工程目录:D:\git\wei-customer-care然后点击finishStep4)等待工程maven建立这会是很长的时间,因为maven要下载所需要的所有依赖jar包14.eclipse开发现在起,你可以用eclipse进行开发有些小tips1)下载第三方开源包源代码2)由于有些项目有很多XML文件,eclipse默认是需要检查xml文件语法,这需要很多时间可以关闭这些检查选择项目,右键”Properties”3)每次修改文件后,在左边文件名前都会有一个”>”符号这表明你已经修改过文件了,但是还没有提交4)把你修改的文件放入待提交区域,你该了多个文件,你可以一个一个把他们加入缓冲区(或者叫index)然后你就会看到相关标记”*”,表示文件已经在缓冲区,还没有正式提交5)当每天工作完成后,提交当天代码选择工程,右键,按下面操作然后简单填写提交原因记住,一定要点击commit,不能点击commitandpush注意,这个只是在你本地提交,并没有提交到服务器端因为git是分布式的系统,为了上传代码,你必须继续下面的步骤15.上传代码到服务器我们强调每天上传代码,为了避免发生不必要损失前面的操作,你实际上只是在本地更新代码,我们还需要上传到服务器Step1)从服务器取得最新代码打开cmd命令提示符,并进入工程目录,比如:E:\apple\Documents\git\alpha-mao>然后运行下列命令gitfetchoriginPasswordauthenticationPassword:上面的代码是从服务器取得最新的dev分支代码Step2)merge服务器dev分支代码到我们的localdev分支代码首先确保当前的工作分子是localdev>gitbranch(查看你本地的分支)*localdevMaster>gitmergeorigin/devAlreadyup-to-date.(表示没有需要merge的地方,如果有冲突,别人也更改了同一处地方,你需要merge代码)有关培训,余强会给大家演示一下Step3)更新代码到远程服务器>gitpushoriginlocaldev:dev16.完毕剩下的还需要大家自己研究,官方网站已经听过很多资料http://gitblit.com/https://git-scm.com/南瓜剪子(北京)alpha-mao/.gitignoretarget/.settings/*.iml*.class*.jar*.classpath*.projectalpha-mao/LICENSEApacheLicenseVersion2.0,January2004http://www.apache.org/licenses/TERMSANDCONDITIONSFORUSE,REPRODUCTION,ANDDISTRIBUTION1.Definitions."License"shallmeanthetermsandconditionsforuse,reproduction,anddistributionasdefinedbySections1through9ofthisdocument."Licensor"shallmeanthecopyrightownerorentityauthorizedbythecopyrightownerthatisgrantingtheLicense."LegalEntity"shallmeantheunionoftheactingentityandallotherentitiesthatcontrol,arecontrolledby,orareundercommoncontrolwiththatentity.Forthepurposesofthisdefinition,"control"means(i)thepower,directorindirect,tocausethedirectionormanagementofsuchentity,whetherbycontractorotherwise,or(ii)ownershipoffiftypercent(50%)ormoreoftheoutstandingshares,or(iii)beneficialownershipofsuchentity."You"(or"Your")shallmeananindividualorLegalEntityexercisingpermissionsgrantedbythisLicense."Source"formshallmeanthepreferredformformakingmodifications,includingbutnotlimitedtosoftwaresourcecode,documentationsource,andconfigurationfiles."Object"formshallmeananyformresultingfrommechanicaltransformationortranslationofaSourceform,includingbutnotlimitedtocompiledobjectcode,generateddocumentation,andconversionstoothermediatypes."Work"shallmeantheworkofauthorship,whetherinSourceorObjectform,madeavailableundertheLicense,asindicatedbyacopyrightnoticethatisincludedinorattachedtothework(anexampleisprovidedintheAppendixbelow)."DerivativeWorks"shallmeananywork,whetherinSourceorObjectform,thatisbasedon(orderivedfrom)theWorkandforwhichtheeditorialrevisions,annotations,elaborations,orothermodificationsrepresent,asawhole,anoriginalworkofauthorship.ForthepurposesofthisLicense,DerivativeWorksshallnotincludeworksthatremainseparablefrom,ormerelylink(orbindbyname)totheinterfacesof,theWorkandDerivativeWorksthereof."Contribution"shallmeananyworkofauthorship,includingtheoriginalversionoftheWorkandanymodificationsoradditionstothatWorkorDerivativeWorksthereof,thatisintentionallysubmittedtoLicensorforinclusionintheWorkbythecopyrightownerorbyanindividualorLegalEntityauthorizedtosubmitonbehalfofthecopyrightowner.Forthepurposesofthisdefinition,"submitted"meansanyformofelectronic,verbal,orwrittencommunicationsenttotheLicensororitsrepresentatives,includingbutnotlimitedtocommunicationonelectronicmailinglists,sourcecodecontrolsystems,andissuetrackingsystemsthataremanagedby,oronbehalfof,theLicensorforthepurposeofdiscussingandimprovingtheWork,butexcludingcommunicationthatisconspicuouslymarkedorotherwisedesignatedinwritingbythecopyrightowneras"NotaContribution.""Contributor"shallmeanLicensorandanyindividualorLegalEntityonbehalfofwhomaContributionhasbeenreceivedbyLicensorandsubsequentlyincorporatedwithintheWork.2.GrantofCopyrightLicense.SubjecttothetermsandconditionsofthisLicense,eachContributorherebygrantstoYouaperpetual,worldwide,non-exclusive,no-charge,royalty-free,irrevocablecopyrightlicensetoreproduce,prepareDerivativeWorksof,publiclydisplay,publiclyperform,sublicense,anddistributetheWorkandsuchDerivativeWorksinSourceorObjectform.3.GrantofPatentLicense.SubjecttothetermsandconditionsofthisLicense,eachContributorherebygrantstoYouaperpetual,worldwide,non-exclusive,no-charge,royalty-free,irrevocable(exceptasstatedinthissection)patentlicensetomake,havemade,use,offertosell,sell,import,andotherwisetransfertheWork,wheresuchlicenseappliesonlytothosepatentclaimslicensablebysuchContributorthatarenecessarilyinfringedbytheirContribution(s)aloneorbycombinationoftheirContribution(s)withtheWorktowhichsuchContribution(s)wassubmitted.IfYouinstitutepatentlitigationagainstanyentity(includingacross-claimorcounterclaiminalawsuit)allegingthattheWorkoraContributionincorporatedwithintheWorkconstitutesdirectorcontributorypatentinfringement,thenanypatentlicensesgrantedtoYouunderthisLicenseforthatWorkshallterminateasofthedatesuchlitigationisfiled.4.Redistribution.YoumayreproduceanddistributecopiesoftheWorkorDerivativeWorksthereofinanymedium,withorwithoutmodifications,andinSourceorObjectform,providedthatYoumeetthefollowingconditions:YoumustgiveanyotherrecipientsoftheWorkorDerivativeWorksacopyofthisLicense;andYoumustcauseanymodifiedfilestocarryprominentnoticesstatingthatYouchangedthefiles;andYoumustretain,intheSourceformofanyDerivativeWorksthatYoudistribute,allcopyright,patent,trademark,andattributionnoticesfromtheSourceformoftheWork,excludingthosenoticesthatdonotpertaintoanypartoftheDerivativeWorks;andIftheWorkincludesa"NOTICE"textfileaspartofitsdistribution,thenanyDerivativeWorksthatYoudistributemustincludeareadablecopyoftheattributionnoticescontainedwithinsuchNOTICEfile,excludingthosenoticesthatdonotpertaintoanypartoftheDerivativeWorks,inatleastoneofthefollowingplaces:withinaNOTICEtextfiledistributedaspartoftheDerivativeWorks;withintheSourceformordocumentation,ifprovidedalongwiththeDerivativeWorks;or,withinadisplaygeneratedbytheDerivativeWorks,ifandwhereversuchthird-partynoticesnormallyappear.ThecontentsoftheNOTICEfileareforinformationalpurposesonlyanddonotmodifytheLicense.YoumayaddYourownattributionnoticeswithinDerivativeWorksthatYoudistribute,alongsideorasanaddendumtotheNOTICEtextfromtheWork,providedthatsuchadditionalattributionnoticescannotbeconstruedasmodifyingtheLicense.YoumayaddYourowncopyrightstatementtoYourmodificationsandmayprovideadditionalordifferentlicensetermsandconditionsforuse,reproduction,ordistributionofYourmodifications,orforanysuchDerivativeWorksasawhole,providedYouruse,reproduction,anddistributionoftheWorkotherwisecomplieswiththeconditionsstatedinthisLicense.5.SubmissionofContributions.UnlessYouexplicitlystateotherwise,anyContributionintentionallysubmittedforinclusionintheWorkbyYoutotheLicensorshallbeunderthetermsandconditionsofthisLicense,withoutanyadditionaltermsorconditions.Notwithstandingtheabove,nothinghereinshallsupersedeormodifythetermsofanyseparatelicenseagreementyoumayhaveexecutedwithLicensorregardingsuchContributions.6.Trademarks.ThisLicensedoesnotgrantpermissiontousethetradenames,trademarks,servicemarks,orproductnamesoftheLicensor,exceptasrequiredforreasonableandcustomaryuseindescribingtheoriginoftheWorkandreproducingthecontentoftheNOTICEfile.7.DisclaimerofWarranty.Unlessrequiredbyapplicablelaworagreedtoinwriting,LicensorprovidestheWork(andeachContributorprovidesitsContributions)onan"ASIS"BASIS,WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied,including,withoutlimitation,anywarrantiesorconditionsofTITLE,NON-INFRINGEMENT,MERCHANTABILITY,orFITNESSFORAPARTICULARPURPOSE.YouaresolelyresponsiblefordeterminingtheappropriatenessofusingorredistributingtheWorkandassumeanyrisksassociatedwithYourexerciseofpermissionsunderthisLicense.8.LimitationofLiability.Innoeventandundernolegaltheory,whetherintort(includingnegligence),contract,orotherwise,unlessrequiredbyapplicablelaw(suchasdeliberateandgrosslynegligentacts)oragreedtoinwriting,shallanyContributorbeliabletoYoufordamages,includinganydirect,indirect,special,incidental,orconsequentialdamagesofanycharacterarisingasaresultofthisLicenseoroutoftheuseorinabilitytousetheWork(includingbutnotlimitedtodamagesforlossofgoodwill,workstoppage,computerfailureormalfunction,oranyandallothercommercialdamagesorlosses),evenifsuchContributorhasbeenadvisedofthepossibilityofsuchdamages.9.AcceptingWarrantyorAdditionalLiability.WhileredistributingtheWorkorDerivativeWorksthereof,Youmaychoosetooffer,andchargeafeefor,acceptanceofsupport,warranty,indemnity,orotherliabilityobligationsand/orrightsconsistentwiththisLicense.However,inacceptingsuchobligations,YoumayactonlyonYourown
/
本文档为【Gitblit搭建及Git协作开发流程参考】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索