2

I'm trying to set up a repo on git. I created an account and started setting it up. I'm currently on the last step on this page: http://help.github.com/msysgit-key-setup/

[Testing things out]

I do: $ssh git@github.com and get the error ssh: connect to host github.com port 22: Bad file number

Can anyone help me get my repo up and running?

Thank you all so much for reading and helping!

Edit:

1) I am running Windows Vista

2) I may have firewall issues due to my living at a boarding school

3) Image when I try to push the repo:

https://i.stack.imgur.com/OUUoO.jpg

Dbz
  • 2,721
  • 4
  • 35
  • 53
  • Post us a `ssh -vvv git@github.com` if you're still stuck. (But, please, not as screenshot — you *can* copy-paste to/from Windows console, google it) – Alexander Gladysh Feb 25 '11 at 10:50

1 Answers1

4

If your proxy/firewall don't allow outgoing ssh requests, (and you can check your ssh-related issue with this SO answer), try https:

With GitHub, you have a smart HTTP support in place for you to use when pushing to a GitHub repo. (Also detailed in this other SO answer)

smart http protocol

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • To clarify: "your server" on this picture is GitHub :-) – Alexander Gladysh Feb 25 '11 at 09:39
  • @Dbz: This means that you need to set your `origin` to `https://Dbz@github.com/Dbz/Drag-and-Drop-Engine.git`. (Either retry everything from the `git init`, or edit `.git/config` manually and try push.) – Alexander Gladysh Feb 25 '11 at 09:41
  • @Alexander: yes it is :) Since 443 isn't blocked (generally) by firewalls, using `https` to push is a safer bet than `ssh`. But it only works because GitHub has setup the "smart http" server on its side. – VonC Feb 25 '11 at 09:42
  • @Alexander: `git remote` (http://www.kernel.org/pub/software/scm/git/docs/git-remote.html) is perfect for changing `origin` or any other remote. – VonC Feb 25 '11 at 09:43
  • @VonC: indeed, but `set-url` was not there last time I looked at `git remote` docs (it was added merely a year ago), and I considered `rm`+`add` to be more error prone than manual edit for this question. – Alexander Gladysh Feb 25 '11 at 10:05
  • @Alexander: true, `set-url` is for Git1.7.0+. – VonC Feb 25 '11 at 12:00
  • Okay, this helped a lot. I had to manually change the `origin` to `https://Dbz@github.com/Dbz/Drag-and-Drop-Engine.git` and pushed. I believe everything is working now. I'm not sure what anything you guys said (past that point) means though. – Dbz Feb 25 '11 at 17:45
  • 1
    @Dbz: just that your firewall or proxy won't prevent you to push with https, and that you could easily change origin url with `git remote set-url origin https://...` – VonC Feb 25 '11 at 18:00