I cloned my GitHub repository here at home, and obviously screwed something up. Anyway, I made a lot of changes, or I'd wipe out the directory and do it all again.
First of all, when I do ssh [email protected]
I get the following:
PTY allocation request failed on channel 0
ERROR: Hi asdfadfs! You've successfully authenticated, but GitHub does not provide shell access Connection to github.com closed.
I get an error, but it says I've successfully authenticated?
git add .
git commit -a -m "hello"
git push origin master
[master 74a5e82] hello
3 files changed, 45 insertions(+), 12 deletions(-)
fatal: The remote end hung up unexpectedly
This obviously doesn't work. And I'm new to git, so now when I try to commit this happens:
git add .
git commit -a -m "hello"
git push origin master
# On branch master
nothing to commit (working directory clean)
fatal: The remote end hung up unexpectedly
And finally, git pull
?
$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either. Please
specify which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.master.remote = <nickname>
branch.master.merge = <remote-ref>
remote.<nickname>.url = <url>
remote.<nickname>.fetch = <refspec>
See git-config(1) for details.
Here's my .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[branch "master"]
[remote "origin"]
url = git://github.com/my/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
That url variable actually points to my correct git url. Thanks.
Use ssh://
in your .git/config, not git://
. git://
is only used for cloning a repository. Straight from my libcloud repository -- I use "mothership" for reasons irrelevant to this post:
[remote "mothership"]
url = ssh://[email protected]/jedsmith/libcloud.git
fetch = +refs/heads/*:refs/remotes/origin/*
The clue should be that you're using ssh to test your connectivity...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With