Git(bitbucket):将ssh隧道引入现有存储库

时间:2016-03-21 19:45:10

标签: git ssh bitbucket

显然,从伊朗访问bitbucket有一些麻烦 - 我目前所在的位置。这涉及git工作流程及其网站。这不是审查,因为审查取代了页面输出"真正的审查制度"。在这里,当我尝试拉动时,我正在获得超时和以下内容:

ssh: connect to host bitbucket.org port 22: Operation timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我在欧洲有另一台计算机,我可以ping和ssh,所以我想通过那个。我在Mac OS上。我尝试了以下方法:

  • 打开一个终端窗口和

    ssh -L 3333:bitbucket.org:22 user@ssh-host -N
    
  • 打开另一个终端窗口并进入.git/config并替换

    url = git@localhost:3333/project.git
    

然而,我得到了

ssh: connect to host localhost port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

由于我支持非常糟糕的互联网,重要的是不要从头开始克隆项目,而只需使用我本地已有的存储库来更新它。

它的价值 - 如果它是一个调试命令,这里是评论员命令的输出:

$ ssh -vvv git@bitbucket.org
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to bitbucket.org [104.192.143.2] port 22.
debug1: connect to address 104.192.143.2 port 22: Operation timed out

1 个答案:

答案 0 :(得分:0)

你可以选择将以下内容添加到〜/ .ssh / config

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<form action="index.php" id="myForm" name="myForm" enctype="multipart/form-data" method="post" accept-charset="utf-8">
  desktop:
  <input type="file" id="files" name="files" multiple>
  <div id="selectedFiles"></div>
  <br/>
</form>

然后只需从您当地的主机那里使用:

git@bitbucket/project.git

相关问题