Connect to a git server in port other than 22
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 1.7k
- Forks
- 408
- Merge moyen
- 2 j 57 min
- PR mergées (30 j)
- 7
Description
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?
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez au point d’entrée pygit2.clone_repository et reproduisez la commande de clonage ssh://localhost:8822 signalée. Suivez la manière dont l’URL est analysée et transmise au transport SSH, puis vérifiez que le clonage depuis un port autre que 22 réussit sans l’erreur de protocole d’URL non pris en charge.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- git, python
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100