From: James Moger Date: Sat, 28 May 2011 03:37:24 +0000 (-0400) Subject: Codepro analyze dependencies. Documentation. X-Git-Tag: v0.5.0~32 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1f9daef870a8c7a984955166a542628d69012ed5;p=gitblit.git Codepro analyze dependencies. Documentation. --- diff --git a/README.MKD b/README.MKD index 719f40df..2a94730f 100644 --- a/README.MKD +++ b/README.MKD @@ -1,18 +1,9 @@ Gitblit ================= -Gitblit is an open source, pure Java Git solution. - -Gitblit can be found at: http://gitblit.com and is licensed under -the Apache Software Foundation license, version 2.0. - -Contents --------- - - License - - Java/Application server requirements - - Getting help - - Building Gitblit - +Gitblit is an open source, pure Java Git solution for creating, viewing, and serving [Git](http://git-scm.com) repositories.
+More information about Gitblit can be found [here](http://gitblit.com). + License ------- @@ -28,8 +19,7 @@ Gitblit requires at least Java 1.6. Getting help ------------ - - Read the online documentation available on the Gitblit website - (http://gitblit.com) +Read the online documentation available at the [Gitblit website](http://gitblit.com) Building Gitblit ---------------- @@ -40,7 +30,6 @@ Building Gitblit 2. Using Ant, execute the `build.xml` script in the project root.
*This will download all necessary build dependencies and will also generate the Keys class for accessing settings.* 3. Select your gitblit project root and **Refresh** the project, this should correct all build problems. -4. Review the settings in `gitblit.properties` in your project root.
-Make sure you set an appropriate value for *git.repositoriesFolder*. -5. Execute the *com.gitblit.Launcher* class to start Gitblit. - \ No newline at end of file +4. Using JUnit, execute the `com.gitblit.tests.GitBlitSuite` test suite.
+*This will clone some repositories from the web and run through the unit tests.* +5. Execute the *com.gitblit.Launcher* class to start Gitblit. \ No newline at end of file diff --git a/build.xml b/build.xml index 2c8a24ae..4b279101 100644 --- a/build.xml +++ b/build.xml @@ -25,7 +25,7 @@ - + @@ -154,6 +154,14 @@ + + + + + + + + @@ -187,6 +195,9 @@ + + + @@ -199,9 +210,13 @@ + + + + - + diff --git a/distrib/gitblit.properties b/distrib/gitblit.properties index 4e2965fd..c17674ab 100644 --- a/distrib/gitblit.properties +++ b/distrib/gitblit.properties @@ -3,18 +3,22 @@ # # Allow push/pull over http/https with JGit servlet +# Changing this value requires a server restart. git.enableGitServlet = true # Base folder for repositories +# Changing this value requires a server restart. # Use forward slashes even on Windows!! +# e.g. c:/gitrepos git.repositoriesFolder = git # Export all repositories +# Changing this value requires a server restart. # if false, each exported repository must have a .git/git-daemon-export-ok file git.exportAll = true # Search repositories folder for nested repositories -# e.g. /libraries/mylibrary.git +# e.g. c:/gitrepos/libraries/mylibrary.git git.nestedRepositories = true # @@ -22,12 +26,15 @@ git.nestedRepositories = true # # Require authentication to see everything but the admin pages +# Changing this value requires a server restart. web.authenticateViewPages = false # Require admin authentication for the admin functions and pages +# Changing this value requires a server restart. web.authenticateAdminPages = true # Simple user realm file to authenticate users +# Changing this value requires a server restart. realm.realmFile = users.properties # How to store passwords. @@ -44,10 +51,11 @@ realm.minPasswordLength = 5 # If blank Gitblit is displayed. web.siteName = -# If web.authenticate=true, users with "admin" role can create repositories, -# create users, and edit repository metadata (owner, description, etc) +# If web.authenticateAdminPages=true, users with "admin" role can create +# repositories, create users, and edit repository metadata. # -# If web.authenticate=false, any user can execute the aforementioned functions. +# If web.authenticateAdminPages=false, any user can execute the aforementioned +# functions. web.allowAdministration = true # Allow dyanamic zip downloads. @@ -60,20 +68,23 @@ web.repositoriesMessage = gitblit # Use the client timezone when formatting dates. # This uses AJAX to determine the browser's timezone. +# Changing this value requires a server restart. web.useClientTimezone = false # Date and Time formats +# http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html web.datestampShortFormat = yyyy-MM-dd web.datetimestampLongFormat = EEEE, MMMM d, yyyy h:mm a z # Show other URLs on the summary page for accessing your git repositories # Use spaces to separate urls. {0} is the token for the repository name. +# e.g. # web.otherUrls = ssh://localhost/git/{0} git://localhost/git/{0} web.otherUrls = # Choose how to present the repositories list. -# grouped = group nested/subfolder repositories together (no sorting) -# flat = flat list of repositories (sorting allowed) +# grouped = group nested/subfolder repositories together (no sorting) +# flat = flat list of repositories (sorting allowed) web.repositoryListType = grouped # If using a grouped repository list and there are repositories at the @@ -92,7 +103,7 @@ web.showEmailAddresses = true web.showSearchTypeSelection = false # Generates a line graph of repository activity over time on the Summary page. -# This is a real-time graph so generation may be expensive. +# This uses the Google Charts API. web.generateActivityGraph = true # The number of commits to display on the summary page @@ -108,22 +119,27 @@ web.summaryRefsCount = 5 web.itemsPerPage = 50 # Registered extensions for google-code-prettify +# (case-insensitive) web.prettyPrintExtensions = c cpp cs css htm html java js php pl prefs properties py rb sh sql xml vb # Registered extensions for markdown transformation -web.markdownExtensions = md mkd markdown +# (CASE-SENSITIVE) +web.markdownExtensions = md mkd markdown MD MKD # Image extensions +# (case-insensitive) web.imageExtensions = bmp jpg gif png # Registered extensions for binary blobs +# (case-insensitive) web.binaryExtensions = jar pdf tar.gz zip # Aggressive heap management will run the garbage collector on every generated -# page. This slows down page generation but improves heap consumption. +# page. This slows down page generation a little but improves heap consumption. web.aggressiveHeapManagement = true # Run the webapp in debug mode +# Changing this value requires a server restart. web.debugMode = false # Enable/disable global regex substitutions (i.e. shared across repositories) @@ -141,9 +157,21 @@ regex.global = true # # Server Settings # +# Changing any of these values requires a server restart. + +# The temporary folder to decompress the gitblit webapp. server.tempFolder = temp + +# The common log4j logging pattern +# http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html server.log4jPattern = %-5p %d{MM-dd HH:mm:ss.SSS} %-20.20c{1} %m%n + +# Alternatively, you may specify a logging pattern for your OS. +# If the os pattern is blank, the common pattern is used. + +# This windows pattern fits (mostly) within the fixed bounds of a command prompt. server.log4jPattern.windows = %-5p %m%n + server.log4jPattern.linux = @@ -162,13 +190,13 @@ server.httpsPort = 443 # Specify the interface for Jetty to bind the standard connector. # You may specify an ip or an empty value to bind to all interfaces. -# Specifying localhost will result in Git:Blit ONLY listening to requests to +# Specifying localhost will result in Gitblit ONLY listening to requests to # localhost. server.httpBindInterface = localhost # Specify the interface for Jetty to bind the secure connector. # You may specify an ip or an empty value to bind to all interfaces. -# Specifying localhost will result in Git:Blit ONLY listening to requests to +# Specifying localhost will result in Gitblit ONLY listening to requests to # localhost. server.httpsBindInterface = localhost @@ -176,7 +204,7 @@ server.httpsBindInterface = localhost # Keystore password and certificate password must match. # This is provided for convenience, its probably more secure to set this value # using the --storePassword command line parameter. -server.storePassword = dosomegit +server.storePassword = gitblit # Port for shutdown monitor to listen on. server.shutdownPort = 8081 diff --git a/docs/00_index.mkd b/docs/00_index.mkd index e21a158b..9ad1c4e8 100644 --- a/docs/00_index.mkd +++ b/docs/00_index.mkd @@ -107,10 +107,10 @@ The following dependencies are automatically downloaded from the Apache Maven re - [JSch - Java Secure Channel](http://www.jcraft.com/jsch) (BSD) - [JUnit](http://junit.org) (Common Public License) -## Building +## Building from Source [Eclipse](http://eclipse.org) is recommended for development as the project settings are preconfigured. -Additionally, [Google CodePro AnalytiX](http://code.google.com/javadevtools), [eclipse-cs](http://eclipse-cs.sourceforge.net), and [FindBugs](http://findbugs.sourceforge.net) are recommended development tools. +Additionally, [Google CodePro AnalytiX](http://code.google.com/javadevtools), [eclipse-cs](http://eclipse-cs.sourceforge.net), [FindBugs](http://findbugs.sourceforge.net), and [EclEmma](http://www.eclemma.org) are recommended development tools. 1. Clone the git repository from [Github][gitbltsrc]. 2. Import the gitblit project into your Eclipse workspace.
@@ -118,8 +118,11 @@ Additionally, [Google CodePro AnalytiX](http://code.google.com/javadevtools), [e 3. Using Ant, execute the `build.xml` script in the project root.
*This will download all necessary build dependencies and will also generate the Keys class for accessing settings.* 4. Select your gitblit project root and **Refresh** the project, this should correct all build problems. -5. Review the settings in `gitblit.properties` in your project root.
-Make sure you set an appropriate value for *git.repositoriesFolder*. +5. Using JUnit, execute the `com.gitblit.tests.GitBlitSuite` test suite.
+*This will clone some repositories from the web and run through the unit tests.* +5. Review the settings in `gitblit.properties` in your project root. + - By default, the *git.repositoriesFolder* points to the repositories cloned by the test suite.
+ - If running on Linux you may have to change the served port(s) to > 1024 unless you are developing as the root user. 6. Execute the *com.gitblit.Launcher* class to start Gitblit. [jgit]: http://eclipse.org/jgit "Eclipse JGit Site" diff --git a/docs/00_setup.mkd b/docs/00_setup.mkd index 447f1515..99fd05fc 100644 --- a/docs/00_setup.mkd +++ b/docs/00_setup.mkd @@ -1,4 +1,4 @@ -## Setup and Configuration +## Server Setup and Configuration 1. Download and unzip [Gitblit %VERSION%](http://gitblit.com/%DISTRIBUTION%).
*Its best to eliminate spaces in the path name as that can cause troubleshooting headaches.* @@ -74,4 +74,23 @@ Set the *JVM* variable in the script to the location of your Java Virtual Machin **Example** - java -jar gitblit.jar --realmFile c:\myrealm.txt --storePassword something \ No newline at end of file + java -jar gitblit.jar --realmFile c:\myrealm.txt --storePassword something + +## Client Setup and Configuration +### Https with Self-Signed Certificates +You must tell Git not to verify the self-signed certificate in order to perform any remote Git operations. + +- Eclipse/EGit + 1. Window->Preferences->Team->Git->Configuration + 2. Click the *New Entry* button + 3.
Key = *http.sslVerify*       
+       Value = *false*
+- Command-line Git ([Git-Config Manual Page](http://www.kernel.org/pub/software/scm/git/docs/git-config.html)) +
git-config --global --bool --add http.sslVerify false
+ +### Cloning an Access Restricted Repository +- Eclipse/Egit
Nothing special to configure, EGit figures out everything. +
https://yourserver/git/your/repository
+- Command-line Git
*My testing indicates that your username must be embedded in the url. YMMV.* +
https://username@yourserver/git/your/repository
+ \ No newline at end of file diff --git a/docs/01_eclipse.mkd b/docs/01_eclipse.mkd deleted file mode 100644 index e768b73a..00000000 --- a/docs/01_eclipse.mkd +++ /dev/null @@ -1,18 +0,0 @@ -## Eclipse Tips - -### Do Not Verify Self-Signed Certificates -If you are using a self-signed certificate, like the one that is automatically generated by Gitblit, you have to tell Eclipse/EGit to ignore certificate verification errors. - -![sslverify](sslverify.png "http.sslVerify setting") - -![sslverify2](sslverify2.png "Adding http.sslVerify setting") - -### Pushing a New Project to a New Gitblit Repository -1. Project Root->Team->Share->Git -Create a Git repository inside the project - -### Pushing a Git-Controlled Project to another Gitblit Repository -1. Project Root->Team->Remote->Push -2. Enter the URL information of the repository -3. In the Refspec dialog click the buttons named "All all branches spec" and "All all tags spec" - diff --git a/docs/01_faq.mkd b/docs/01_faq.mkd index 86aa9ad2..5068e79a 100644 --- a/docs/01_faq.mkd +++ b/docs/01_faq.mkd @@ -1,10 +1,31 @@ -## Frequently Asked Questions +## Troubleshooting + +### Eclipse/Egit/Git complains that it "can't open upload pack"? +There are a few ways this can occur: + +1. You are using https with a self-signed certificate and you **did not** configure *http.sslVerify=false* + 1. Window->Preferences->Team->Git->Configuration + 2. Click the *New Entry* button + 3.
Key = *http.sslVerify*       
+       Value = *false*
+2. The repository is clone-restricted and you don't have access. +3. The repository is clone-restricted and your password changed. +4. A regression in Gitblit. :( + +### Why can't I access Gitblit from another machine? +Please check *server.httpBindInterface* and *server.httpsBindInterface* in `gitblit.properties`. + +### How do I run Gitblit on port 80 or 443 in Linux? +Linux requires root permissions to serve on ports < 1024.
+Run the server as *root* (security concern) or change the ports you are serving to 8080 (http) and/or 8443 (https). + +## General Interest Questions ### Gitblit? What kind of name is that? -Its a phonetic play on [bitblt][bitblt] which is an image processing operation meaning *bit-block transfer*. +It's a phonetic play on [bitblt][bitblt] which is an image processing operation meaning *bit-block transfer*. ### Why use Gitblit? -Its small. Its portable. Its easy to manage. +It's a small tool that allows you to easily manage shared repositories and doesn't require alot of setup or git kung-foo. ### Do I need real Git? No. Gitblit is based on [JGit][jgit] which is a pure Java implementation of the [Git version control system][git].
@@ -13,11 +34,16 @@ Everything you need for Gitblit is either in the zip distribution file or automa ### Do I need a JDK or can I use a JRE? Gitblit will run just fine with a JRE. Gitblit can optionally use `keytool` from the JDK to generate self-signed certificates, but normally Gitblit uses [BouncyCastle][bouncycastle] for that need. +### I want to deploy Gitblit into my own servlet container. Where is the WAR? +At this time there is no WAR build available. + ### Does Gitblit use a database to store its data? No. Gitblit stores its repository configuration information within the `.git/config` file and its user information in `users.properties` or whatever filename is configured in `gitblit.properties`. -### I want to deploy Gitblit into my own servlet container. Where is the WAR? -At this time there is no WAR build available. +### Can I manually edit users.properties, gitblit.properties, or .git/config? +Yes. You can manually manipulate all of them and (most) changes will be immediately available to Gitblit.
Exceptions to this are noted in `gitblit.properties`. + +*NOTE:* Care must be taken to preserve the relationship between user roles and repository names.
Please see the [setup](/setup.html) page for details. ### Can I restrict access to paths within a repository? No. Access restrictions apply to the repository as a whole. @@ -26,7 +52,7 @@ Gitblit's simple authentication and authorization mechanism can be used to facil ### Why doesn't Gitblit support SSH? Gitblit could integrate [Apache Mina][mina] to provide SSH access. However, doing so violates Gitblit's first design principle: [KISS](http://en.wikipedia.org/wiki/KISS_principle).
-SSH support requires creating, exchanging, and managing SSH keys. While this is possible, JGit's SmartHTTP implementation is a simpler and cleaner transport mechanism. +SSH support requires creating, exchanging, and managing SSH keys. While this is possible, JGit's SmartHTTP implementation is a simpler and universal transport mechanism. You might consider running [Gerrit](http://gerrit.googlecode.org) which does integrate [Apache Mina][mina] and supports SSH or you might consider serving [Git][git] on Linux which would offer real SSH support and also allow use of [many other compelling Git solutions](https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools). @@ -40,9 +66,8 @@ To search by *author* or *committer* use the following syntax in the search box: Alternatively, you could enable the search type dropdown list in your `gitblit.properties` file. -### How do I run Gitblit on port 80 or 443 in Linux? -Linux requires root permissions to serve on ports < 1024.
-Run the server as *root* (security concern) or change the ports you are serving to 8080 (http) and/or 8443 (https). +### I see a disabled "blame" link. How do I enable it? +Currently blame is not implemented. Those links are placeholders to remind me where Gitweb offers blame. [bitblt]: http://en.wikipedia.org/wiki/Bit_blit "Wikipedia Bitblt" [jgit]: http://eclipse.org/jgit "Eclipse JGit Site" diff --git a/docs/02_properties.mkd b/docs/02_properties.mkd new file mode 100644 index 00000000..3a1dec17 --- /dev/null +++ b/docs/02_properties.mkd @@ -0,0 +1,4 @@ +## gitblit.properties +
+%PROPERTIES%
+
\ No newline at end of file diff --git a/docs/page_header.html b/docs/page_header.html index fd40c5a2..4a2128e0 100644 --- a/docs/page_header.html +++ b/docs/page_header.html @@ -8,6 +8,7 @@ + + - +