Error in git push heroku master through ssh behind proxy

后端 未结 2 1268
长发绾君心
长发绾君心 2020-12-01 19:24

Brief Context:
Hi, I am a university student (behind proxy 10.3.100.211:8080), new to ROR, Git & Heroku and have been following Ruby on Rails tutori

相关标签:
2条回答
  • 2020-12-01 19:43

    In your .ssh/config write this :

    Host git_heroku
      Hostname heroku.com
      User git
      ProxyCommand corkscrew 10.3.100.211 8080 %h %p
      Port 443
    

    and in your .git/config change

    git@heroku.com
    

    to

    git_heroku
    

    The full line for a remote will look something like:

    [remote "appname"]
      url = git_heroku:appname.git
      fetch = +refs/heads/*:refs/remotes/appname/*
    

    git_heroku is an alias; you need to change your git config to use that alias.

    0 讨论(0)
  • 2020-12-01 19:52

    In addition to answer above in your .ssh/config:

    • use ssh.heroku.com for Hostname instead of heroku.com
    • make sure you include your identity file IdentityFile "path to identity file"
    • don't specify Port

    So my .ssh/config file looks something like this:

    Host git_heroku
    ProxyCommand corkscrew proxy.usurt.ru 3128 %h %p
    HostName ssh.heroku.com
    User git
    IdentityFile "~/.ssh/id_rsa.pub"
    

    And appropriate lines in .git/config file:

    [remote "heroku"]
        url = git_heroku:still-taiga-2820.git
        fetch = +refs/heads/*:refs/remotes/heroku/*
    
    0 讨论(0)
提交回复
热议问题