Sklonowałem moje repozytorium GitHub tutaj, w domu, i oczywiście coś spieprzyłem. W każdym razie wprowadziłem wiele zmian, albo usunę katalog i zrobię to jeszcze raz.Nie mogę wcisnąć do GitHub na tym pudełku
Przede wszystkim, kiedy robię ssh [email protected]
otrzymuję następujący:
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.
pojawia się błąd, ale mówi, że pomyślnie uwierzytelniony?
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
To oczywiście nie działa. A ja jestem nowy w git, więc teraz gdy próbuję popełnić tak się dzieje:
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
i wreszcie 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.
Oto mój .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/*
To zmienna url faktycznie wskazuje na moim git prawidłowego adresu URL. Dzięki.
Duh. Długi dzień. Dzięki. – mculp
Ja też, czuję cię. :) –
Łatwym sposobem na naprawienie tego jest dodanie tego do pliku '~/.gitconfig': https://gist.github.com/412f0b1c8841cceed750 – henrikhodne