SORU
13 EKİM 2009, Salı


Standart olmayan bağlantı ile uzak bir depo kullanarak

Uzak bir depo için yerel gıt projem kuruyorum. Uzak depo standart olmayan bir bağlantı noktası (4019) servis ediliyor.

Ama çalışmıyor. Bunun yerine aşağıdaki hata iletisini alıyorum:

ssh: connect to host git.host.de:4019 port 22: Connection refused
fatal: The remote end hung up unexpectedly
error: failed to push to 'ssh://root@git.host.de:4019/var/cache/git/project.git'

Yerel git, benim yapılandırma as follows:

[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
[remote "origin"]
  url = ssh://root@git.host.de:4019/var/cache/git/project.git
  fetch =  refs/heads/*:refs/remotes/origin/*
[branch "master"]
  remote = origin
  merge = refs/heads/master

(Bağlantı noktası ve ana bilgisayar, gerçek bağlantı noktası ve ana bilgisayar için yer tutucular vardır.)

Git benim yapılandırma ile yanlış nedir?

CEVAP
21 NİSAN 2011, PERŞEMBE


SSH tabanlı gıt erişim yöntemi <repo_path>/.git/config tam bir URL veya http://git-scm.com/docs/git-clone belirtildiği gibi SCP gibi bir sözdizimi kullanarak, ya da belirtilebilir:

Stil URL:

url = ssh://[user@]host.xz[:port]/path/to/repo.git/

Stil SCP:

url = [user@]host.xz:path/to/repo.git/

SCP tarzı doğrudan bir bağlantı noktası yerine değiştirmek ~/.ssh/config gibi: ssh_config host tanımı güvenerek izin vermiyor dikkat edin

Host my_git_host
HostName git.some.host.org
Port 24589
User not_a_root_user

Sonra bir kabuk test edebilirsiniz:

ssh my_git_host

<repo_path>/.git/config. SCP-stil URI değiştirmek

url = my_git_host:path/to/repo.git/

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:
Git

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • BruBearBaby

    BruBearBaby

    25 Ocak 2011
  • Emotional Trancer

    Emotional Tr

    4 Mart 2010
  • thetrollska

    thetrollska

    2 EKİM 2009