Discuss / Git / 救救我

救救我

Topic source

懒惰的IT

#1 Created at ... [Delete] [Delete and Lock User]

shawn@DESKTOP-74PQKO0:~$ git remote add origin git@github.com:WYYVDCode/Git-work.git

fatal: remote origin already exists.

shawn@DESKTOP-74PQKO0:~$ git push -u origin master

error: src refspec master does not match any.

error: failed to push some refs to 'https://github.com/WYYVDCode/Git-work.git'

shawn@DESKTOP-74PQKO0:~$ git push -f origin master

error: src refspec master does not match any.

error: failed to push some refs to 'https://github.com/WYYVDCode/Git-work.git'

shawn@DESKTOP-74PQKO0:~$ git remote add origin https://github.com/WYYVDCode/Git-work.git

fatal: remote origin already exists.

shawn@DESKTOP-74PQKO0:~$ git pull origin master --allow-unrelated-histories

fatal: unable to access 'https://github.com/WYYVDCode/Git-work.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

shawn@DESKTOP-74PQKO0:~$ git branch -M main

shawn@DESKTOP-74PQKO0:~$ git push -u origin main

fatal: unable to access 'https://github.com/WYYVDCode/Git-work.git/': Failed to connect to github.com port 443: Connection refused

润心

#2 Created at ... [Delete] [Delete and Lock User]

看报错的话,我估计是你把origin地址设置成了http协议地址,而不是ssh协议。可以试着用git remote set-url origin修改。


  • 1

Reply