github - git boleh menyambung dengan jayanya, tetapi tidak boleh menolak atau menarik. Bolehkah anda membantu saya, terima kasih!
怪我咯
怪我咯 2017-05-02 09:29:51
0
3
1952

Selepas mewujudkan git secara tempatan, serahkan kod ke repositori. Sedia untuk memuat naik ke github.
Buat laluan:

Birdy-2:learnGit birdy$ git remote add origin http://github.com/timothydsp/learnGit.git
Birdy-2:learnGit birdy$ git push -u origin master
fatal: unable to access 'http://github.com/timothydsp/learnGit.git/': Recv failure: Connection reset by peer

Ralat mula muncul di sini, tidak dapat menyambung
Kemudian saya cuba melihat sama ada terdapat sebarang masalah dengan alamat pautan:

Birdy-2:learnGit birdy$ git remote add origin http://github.com/timothydsp/learnGit.git
fatal: remote origin already exists.

Tidak menemui masalah, cuba sambung ke github:

Birdy-2:learnGit birdy$ ssh -T git@github.com
Hi timothysdp! You've successfully authenticated, but GitHub does not provide shell access.

Jika sambungan berjaya, semak sama ada kunci awam tempatan wujud:

Birdy-2:learnGit birdy$ cd ~/.ssh
Birdy-2:.ssh birdy$ ls
id_rsa        id_rsa.pub    known_hosts

Semak sama ada kunci awam dalam talian adalah sama:

Birdy-2:learnGit birdy$ pbcopy <~/.ssh/id_rsa.pub

Sepatutnya tiada masalah kan? ? ? ? ?
Pergi ke sini:

Birdy-2:learnGit birdy$ ssh -T git@github.com
Hi timothysdp! You've successfully authenticated, but GitHub does not provide shell access.

Mengapa anda tidak boleh menolak atau menarik selepas berpusing-pusing seperti ini?

Anda boleh melihat projek saya dalam talian di sini.

Tolong ajar saya, senior, apa yang salah?

Seorang saudara menyebut menukar kepada HTTPS; atau ssh

Birdy-2:learnGit birdy$ git remote add origin https://github.com/timothysdp/learnGit.git
fatal: remote origin already exists.
Birdy-2:learnGit birdy$ git remote add origin git@github.com:timothysdp/learnGit.git
fatal: remote origin already exists.
Birdy-2:learnGit birdy$ git push -u origin master
fatal: unable to access 'http://github.com/timothydsp/learnGit.git/': Recv failure: Connection reset by peer

Nampaknya masih tidak berkesan~~

怪我咯
怪我咯

走同样的路,发现不同的人生

membalas semua(3)
Peter_Zhu

Cuba tukar ke https

# 删除旧的origin
git remote remove origin
# 添加https的
git remote add origin https://github.com/timothydsp/learnGit.git
習慣沉默

asal http://github.com/timothydsp/learnGit.git

Tukar kepada alamat https atau ssh

巴扎黑
Birdy-2:learnGit birdy$ git remote rm origin
Birdy-2:learnGit birdy$ git remote add origin git@github.com:timothysdp/learnGit.git
Birdy-2:learnGit birdy$ git push -u origin master
Counting objects: 12, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (12/12), 924 bytes | 0 bytes/s, done.
Total 12 (delta 0), reused 0 (delta 0)
To git@github.com:timothysdp/learnGit.git
  • [cawangan baharu] tuan ->

    Branch master set up to track remote branch master from origin.
    
Baiklah, nampaknya saya tidak mempedulikan ralat http dan https

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan