Git.alt: Difference between revisions

From ALT Linux Wiki
Jump to navigation Jump to search
m (→‎How to use?: Rephrasing)
(Translated sections about ls and find-package)
Line 51: Line 51:
In all commands, the .git suffix for repositories is optional and may be omitted; but in the output of commands this suffix is always appended.
In all commands, the .git suffix for repositories is optional and may be omitted; but in the output of commands this suffix is always appended.


<!--==== ls ====
==== ls ====


  '''$ ssh git.alt ls [<directory>]'''
  '''$ ssh git.alt ls [<directory>]'''


Эта команда позволяет посмотреть содержимое различных директорий на <tt>git.alt</tt>:
Similar to UNIX ls, this command lets you see contents of directories at <tt>git.alt</tt>:


  $ ssh git.alt ls /people/dottedmag/public
  $ ssh git.alt ls /people/dottedmag/public
Line 64: Line 64:
  $
  $


Без параметров — показывает содержимое <tt>/people/$USERNAME</tt>:
The command issued without parameters displays the contents of <tt>/people/$USERNAME</tt>:


  $ ssh git.alt ls
  $ ssh git.alt ls
Line 74: Line 74:
  $
  $


От этой же директории отсчитываются относительные пути:
The same directory is used as a base for relative paths:


  $ ssh git.alt ls public
  $ ssh git.alt ls public
Line 87: Line 87:
  '''$ ssh git.alt find-package <pattern>'''
  '''$ ssh git.alt find-package <pattern>'''


Эта команда позволяет искать репозитории по переданному образцу. Единственный метасимвол, допустимый в образце — <tt>*</tt>. Репозитории ищутся в директории <tt>packages</tt> каждого пользователя, поскольку предполагается, что <tt>gear</tt>-репозитории располагаются именно там.
This command searches repositories with names matching <pattern>. The only wildcard character allowed in <pattern> is <tt>*</tt> (asterisk). It is assumed that all public <tt>gear</tt>-repos are located in <tt>packages</tt> directories of each user, so repos are only searched in these directories.


  $ ssh git.alt find-package glibc*
  $ ssh git.alt find-package glibc*
Line 100: Line 100:
  $
  $


Вторая колонка в выводе <tt>find-package</tt> unixtime времени последнего обновления репозитория.
The second column in tt>find-package</tt> output is a unixtime of the last repo update.


==== clone ====
<!--==== clone ====


  '''$ ssh git.alt clone <path to git repository> [<destination directory>]'''
  '''$ ssh git.alt clone <path to git repository> [<destination directory>]'''

Revision as of 06:32, 16 August 2008

Stub.png
Under construction.
This page is not finished yet and may lack substantial information.

What is git.alt?

git.alt is a hosting for git repositories. Git.alt is integrated with gear — the system of packages building and storage.

Services similar to Git.alt are github and gitorious. git.alt differs from them in its advanced SSH repositories management interface, e-mail notifications of many kinds and relatively simplistic web-interface.

How to use?

git.alt provides the following kinds of access to the repositories:

  • SSH. Special commands are provided: repos search, cloning, creation, deletion, build invocation and control, and some auxiliary ones.
  • ssh:, git:, http: provide immediate access to repositories. With git: and http: you can only do read-only operations, ssh: gives read-write access.
  • Web interface. It is located here: http://git.altlinux.org/ and provides repos navigation and gitweb for each individual repo.

SSH access to git.alt is only granted to persons who joined ALT Linux Team.

SSH access

You can use git.alt via SSH at git.altlinux.org:222. The login name is your ALT Linux Team username with _ (underscores) instead of - (hyphens), if there are any.

Here is an example of an entry in your ~/.ssh/config file:

Host git.alt
  HostName git.altlinux.org
  Port 222
  User git_USERNAME

If your are behind a proxy, most ports are blocked etc., you can also access SSH with the address git.altlinux.org:443.

The list of available commands is displayed, when you login to SSH without commands or with help command:

$ ssh git.alt help
Available commands:
help
git-receive-pack <directory>
git-upload-pack <directory>
charset <path to git repository> [<charset>]
clone <path to git repository> [<path to directory>]
find-package <pattern>
init-db <path to directory>
ls [<path to directory>]
mv-db <path to source directory> <path to destination directory>
quota
rm-db <path to git repository>
task {list|new|show|drop|add|run} ...
build <path to gear repository> <tag name> [<binary package repository name>] [<project name>]
$

In all commands, the .git suffix for repositories is optional and may be omitted; but in the output of commands this suffix is always appended.

ls

$ ssh git.alt ls [<directory>]

Similar to UNIX ls, this command lets you see contents of directories at git.alt:

$ ssh git.alt ls /people/dottedmag/public
total 24
drwxr-sr-x 5 4096 Jun 13 10:22 bugzilla-repo-sync.git
...
drwxr-sr-x 5 4096 Jul  7 18:03 wackoconvert.git
$

The command issued without parameters displays the contents of /people/$USERNAME:

$ ssh git.alt ls
total 16
drwxr-s---  5 4096 May 30 21:27 etc
drwxr-sr-x 14 4096 Aug 13 23:53 packages
drwxr-s--x  2 4096 Feb 13  2007 private
drwxr-sr-x  8 4096 Aug 13 23:57 public
$

The same directory is used as a base for relative paths:

$ ssh git.alt ls public
total 24
drwxr-sr-x 5 4096 Jun 13 10:22 bugzilla-repo-sync.git
...
drwxr-sr-x 5 4096 Jul  7 18:03 wackoconvert.git
$

find-package

$ ssh git.alt find-package <pattern>

This command searches repositories with names matching <pattern>. The only wildcard character allowed in <pattern> is * (asterisk). It is assumed that all public gear-repos are located in packages directories of each user, so repos are only searched in these directories.

$ ssh git.alt find-package glibc*
/people/avm/packages/glibc.git	1216320095
...
/people/peet/packages/glibc-kernheaders.git	1177084354
/people/mike/packages/glibc-kvercheck.git	1160664813
$ ssh git.alt find-package glibc
/people/avm/packages/glibc.git	1216320095
...
/people/peet/packages/glibc.git	1177084600
$

The second column in tt>find-package output is a unixtime of the last repo update.