Stream saver: Successful operation:
Bug fix method:
HP@VICTUS MINGW64 /f/PRP/RMMDet_manual (main)
$ ssh -T [email protected]
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
HP@VICTUS MINGW64 /f/PRP/RMMDet_manual (main)
$ ssh -T [email protected]
Hi JameLanny! You've successfully authenticated, but GitHub does not provide shell access.
Sometimes logging in on the webpage and opening the warehouse will succeed
I was a little surprised at the beginning
, since it’s a good thing, let’s use it
$ git clone https://github.com/********/Pre.git
Very fast, cloning to the local is still easy to operate
Realize the function of remote submission
The HTTPS protocol is used to clone the warehouse, and there is no need to configure an SSH key. The HTTPS protocol requires each user name and password to be entered for code operations.
But if you use the SSH protocol to clone the warehouse, you need to configure the SSH key to perform code operations. The steps to configure the SSH key are as follows:
- Open a terminal (MacOS/Linux) or a command prompt (Windows), and enter the following command:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
-
Follow the prompts and press Enter all the way to generate an SSH key. The generated SSH key is saved in
.ssh
a folder under the user directory by default. -
Open the generated public key file (by default
id_rsa.pub
), and copy the public key content to the SSH keys of the github account. -
To test whether the SSH key is configured successfully, enter the following command:
ssh -T [email protected]
If prompted Hi username! You've successfully authenticated, but GitHub does not provide shell access.
, the configuration is successful.
After the configuration is complete, the warehouse can be cloned using the SSH protocol, and there is no need to enter the user name and password every time.
HP@VICTUS MINGW64 /e/Users/HP/Desktop/Pre (main)
$ git add .
HP@VICTUS MINGW64 /e/Users/HP/Desktop/Pre (main)
$ git commit -m "add to files 4.17 evening"
[main c990bec] add to files 4.17 evening
2 files changed, 46 insertions(+)
create mode 100644 MC2_BGM.md
create mode 100644 MC3_THEME.md
HP@VICTUS MINGW64 /e/Users/HP/Desktop/Pre (main)
$ git push origin master
error: src refspec master does not match any
error: failed to push some refs to 'github.com:zzjc1234/Pre.git'
HP@VICTUS MINGW64 /e/Users/HP/Desktop/Pre (main)
$ git branch
* main
HP@VICTUS MINGW64 /e/Users/HP/Desktop/Pre (main)
$ git checkout -b master
Switched to a new branch 'master'
HP@VICTUS MINGW64 /e/Users/HP/Desktop/Pre (master)
$ git push origin master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 16 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 1.77 KiB | 1.77 MiB/s, done.
Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: Create a pull request for 'master' on GitHub by visiting:
remote: https://github.com/zzjc1234/Pre/pull/new/master
remote:
To github.com:zzjc1234/Pre.git
* [new branch] master -> master
At this time, the submission was successful