Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 01/11/2016, à 18:36

bird12358

Probleme d'install gitlist

Bonjour,

Je veux installer un gitlist sur mon pc. J'ai utiliser le lien suivant :
https://www.sitepoint.com/installing-gi … cal-repos/

Ca ne semble pas fonctionner. Sur la page http://localhost j'ai bien la page du serveur apache qui est la mais sur http://localhost/gitlist, je n'ai pas le serveur qui apparait:

404 Not Found
nginx/1.9.3 (Ubuntu)

Quelqu'un pourrait-il m'aider pour faire un diagnostique?

D'avance merci.


Edit: Pour rajouter des informations, j'ai suivis les troubleshootings de cette pages:
https://github.com/klaussilveira/gitlis … leshooting

Voici les fichiers que j'ai:
Fichier /var/www/html/gitlist/conf.ini:

[git]
client = '/usr/bin/git' ; Your git executable path
default_branch = 'master' ; Default branch when HEAD is detached
repositories[] = '/home/xavier/Bureau/Developpement/git' ; Path to your repositories
                                           ; If you wish to add more repositories, just add a new line

; WINDOWS USERS
;client = '"C:\Program Files (x86)\Git\bin\git.exe"' ; Your git executable path
;repositories[] = 'C:\Path\to\Repos\' ; Path to your repositories

; You can hide repositories from GitList, just copy this for each repository you want to hide
; hidden[] = '/home/git/repositories/BetaTest'

[app]
baseurl = 'http://loalhost/gitlist' ; Base URL of the application (without ending slash)
debug = false
cache = true
theme = "default"
title = ""


[clone_button]
; ssh remote
show_ssh_remote = false ; display remote URL for SSH
ssh_user = 'git' ; user to use for cloning via SSH

; http remote
show_http_remote = false ; display remote URL for HTTP
use_https = true ; generate URL with https://
url_subdir = 'git/' ; if cloning via HTTP is triggered using virtual dir (e.g. https://example.com/git/repo.git)
                    ; has to end with trailing slash
http_user = '' ; user to use for cloning via HTTP (default: none)
http_user_dynamic = false ; when enabled, http_user is set to $_SERVER['PHP_AUTH_USER']

; If you need to specify custom filetypes for certain extensions, do this here
[filetypes]
; extension = type
; dist = xml

; If you need to set file types as binary or not, do this here
[binary_filetypes]
; extension = true
; svh = false
; map = true

; set the timezone
[date]
; timezone = UTC
; format = 'd/m/Y H:i:s'

; custom avatar service
[avatar]
; url = '//gravatar.com/avatar/'
; query[] = 'd=identicon'

Mon fichier /etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf

<Directory "/var/www/html">
# Other lines omitted
AllowOverride All
Require all granted
# Other lines omitted
</Directory>

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Dernière modification par bird12358 (Le 01/11/2016, à 23:33)

Hors ligne

#2 Le 02/11/2016, à 09:59

bruno

Re : Probleme d'install gitlist

Bonjour,

Tu utilises Apache ou Nginx comme serveur web ?

Hors ligne

#3 Le 02/11/2016, à 12:55

bird12358

Re : Probleme d'install gitlist

J utilise un serveur apache.

Hors ligne

#4 Le 02/11/2016, à 18:03

bruno

Re : Probleme d'install gitlist

Alors pourquoi ce message d'erreur :

404 Not Found
nginx/1.9.3 (Ubuntu)

Hors ligne

#5 Le 04/11/2016, à 09:44

bird12358

Re : Probleme d'install gitlist

C est une erreur de ma part. J ai fait l installation sur deux pc,  un sur lequel il y avait nginx et l autre non. J ai fait la copie d écran sur celui ou nginx été  installé mais l autre  pc ou nginx n est pas installé  me fait également  un blocage.

Comment je pourrais disgnostiquer mon problème ?

Hors ligne

#6 Le 04/11/2016, à 10:19

bruno

Re : Probleme d'install gitlist

Ok je voulais être sûr qu'il n'y avait de conflit entre les deux serveur web.

L'hôte virtuel par défaut installé par le paquet apache2 utilise le dossier /var/www/html et non le dossier /var/www comme indiqué dans ton tuto.

Tu peux simplement déplacer le dossier que tu a créé :

sudo mv /var/www/gitlist /var/www/html/gitlist

Hors ligne

#7 Le 06/11/2016, à 19:27

bird12358

Re : Probleme d'install gitlist

Merci pour la réponse.
Je viens de faire le changement de dossier mais j'ai toujours ceci:

Not Found

Not Found

The requested URL /var/www/html/gitlist/index.php/ was not found on this server.
Apache/2.4.12 (Ubuntu) Server at localhost Port 80

Pour résumer:
.htaccess

<IfModule mod_rewrite.c>
    Options -MultiViews +SymLinksIfOwnerMatch

    RewriteEngine On
    RewriteBase /var/www/html/gitlist

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php/$1 [L,NC]
</IfModule>
<Files config.ini>
    order allow,deny
    deny from all
</Files>

apache2.conf:

# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
Mutex file:${APACHE_LOCK_DIR} default

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
	Options FollowSymLinks
	AllowOverride All
	Require all denied
</Directory>

<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>

#<Directory /srv/>
#	Options Indexes FollowSymLinks
#	AllowOverride All
#	Require all granted
#</Directory>


<Directory /var/www/html>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride All
	Order allow,deny
	allow from all
</Directory>

# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

000-default.conf:

<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf


    ServerName gitserver
    DocumentRoot /var/www/html/gitlist
    <Directory /var/www/html/gitlist>
	Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        order allow,deny
        Allow from all
        AddHandler cgi-script cgi
        DirectoryIndex gitweb.cgi
    </Directory>

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

SetEnv GIT_PROJECT_ROOT /opt/git
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/

Dernière modification par bird12358 (Le 06/11/2016, à 20:03)

Hors ligne

#8 Le 06/11/2016, à 21:57

bird12358

Re : Probleme d'install gitlist

Je viens de reussir à faire fonctionner le gitlist. J'ai mis ceci:
repositories[] = '/var/www/html/gitlist' ; Path to your repositories

Je croyais que repositories correspondant au liens ou se trouve mes projets gits mais visiblement c'est l'endroit ou l'on a installé gitlist ...
Comment puis-je faire pour indiquer que mes repertoires de projets sont dans un autre dossier?

Autre souci, je n'arrive pas a avoir accès à mon gitlist sur un autre pc, comment puis-je faire pour donner l'accès?

Hors ligne

#9 Le 14/11/2016, à 17:36

bird12358

Re : Probleme d'install gitlist

Bonjour,

Est ce que quelqu'un saurait me répondre à ma 1ère question surtout.
J'ai mes dossiers git qui ne se situent pas au même endroid que mon dossier gitlist. Si je les mets dans mon dossier gitlist mes repos git , je les vois apparaitre sous gitlist, sinon ils n'apparaissent pas.

Que dois-je faire pour changre l'adresse de mes repos?

Hors ligne

#10 Le 14/11/2016, à 21:15

bruno

Re : Probleme d'install gitlist

Bonsoir,

Sur la doc de gitlist (à adapter à Ubuntu), il est indiqué de faire des liens symboliques vers /var/www/html/gitlist pour les dépôts git

Edit :
Autres problèmes potentiels sur les configurations données en #7 :

.htaccess

RewriteBase /

000-default.conf : toutes les directives devraient être dans <VirtualHost> … </Virtualhost>

Dernière modification par bruno (Le 15/11/2016, à 00:06)

Hors ligne

#11 Le 15/11/2016, à 19:52

bird12358

Re : Probleme d'install gitlist

Merci c'est bien ce que j'ai remarqué, si je mets le dossier reposGit en dehors de /var/www/html/gitlist , il n'est pas reconnu.

Quelqu'un pourrait m'indiquer dans ce cas un équivalent à gitlist qui fonctionne avec une repos en dehors de son dossier?

Hors ligne

#12 Le 16/11/2016, à 10:13

bruno

Re : Probleme d'install gitlist

Je ne sais pas…
Peut-être Git web-UI
Après il y a l'artillerie lourde : gitlab

Hors ligne

#13 Le 17/11/2016, à 11:42

bird12358

Re : Probleme d'install gitlist

J'ai reinstaller au propre sur nmon autre pc et j'ai ce message sur la page blocalhost/gitlist:

get('date', 'timezone')) { date_default_timezone_set($config->get('date', 'timezone')); } $app = require 'boot.php'; $app->run(); 

Hors ligne

#14 Le 23/11/2016, à 17:37

Ayral

Re : Probleme d'install gitlist

Modération fil fermé, à suivre là pour cause de doublon.


Pour mettre les retours de commande entre deux balises code, les explications sont là : https://forum.ubuntu-fr.org/viewtopic.php?id=1614731
Blog d'un retraité
Site de graphisme du fiston Loïc
Ubuntu 22.04 LTS sur un Thinkpad W540

Hors ligne