libgit2 / libgit2/pygit2

Connect to a git server in port other than 22

Abierto
#926 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
1.7k
Forks
408
Merge medio
2 d 57 min
PR fusionados (30 d)
7

Descripción

In git, there are two ways to connect/clone a remote repository:

git clone git@git-in-port-22.com:libgit2/pygit2.git
git clone ssh://git@git-in-another-port.com:2345/libgit2/pygit2.git

and the 2nd one support to connect to a remote git server which is not in port 22.

In pygit2 doc, the connection is through

pygit2.clone_repository("ssh://git@github.com/libgit2/pygit2", "pygit2.git",
                        callbacks=callbacks)

After confirmed git clone ssh://git@localhost:8822/home/git/server.git can succeed, I tried

pygit2.clone_repository("ssh://git@localhost:8822/home/git/", "server.git")

but

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pygit2/__init__.py", line 263, in clone_repository
    check_error(err)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pygit2/errors.py", line 64, in check_error
    raise GitError(message)
_pygit2.GitError: unsupported URL protocol

I wonder if there's a way to specify a customized port?

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Start at the pygit2.clone_repository entry point and reproduce the reported ssh://localhost:8822 clone command. Trace how the URL is parsed and passed to the SSH transport, then verify that cloning from a non-22 port succeeds without the unsupported URL protocol error.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
git, python
Área
tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.