मैं दूरस्थ रिपॉजिटरी के लिए अपना स्थानीय git प्रोजेक्ट स्थापित कर रहा हूं। रिमोट रिपॉजिटरी को एक गैर-मानक पोर्ट (4019) पर परोसा जा रहा है।
लेकिन यह काम नहीं करता है। इसके बजाय मुझे निम्नलिखित त्रुटि संदेश मिलता है:
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'
मेरा स्थानीय git config निम्नानुसार है :
[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
(पोर्ट और होस्ट वास्तविक पोर्ट और होस्ट के लिए प्लेसहोल्डर हैं।)
मेरे गिट कॉन्फ़िगरेशन के बारे में क्या गलत है?
git remote set-url origin git@altssh.bitbucket.org:443/yourname/yourrepo/यह काम नहीं करेंगे। लेकिन, अगर आप ऐसा करते हैं, तो git remote set-url origin ssh://git@altssh.bitbucket.org:443/yourname/yourrepo/काम करेंगे
ssh://से यूआरएल के सामने नहीं रखते हैं , तो यह सोचता है कि यह एक अलग प्रारूप है। sossh://example.com:444/etc// / etc / example.com port 44 केexample.com:444/etc/माध्यम से है।