小白建议参考github文件上传全流程-新手入门系列(超详细!!!)
中间可能会有报错
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
这时,参考,如何解决:ssh: connect to host github.com port 22: Connection refused ,即可解决。
正式开始
先在文件夹下面右击运行git bush here,打开命令窗口,测试是否可以链接到github
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes
ssh -T git@github.com
Hi Jie-Bai! You’ve successfully authenticated, but GitHub does not provide shell access.
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes
git config --global user.name "Jie-Bai"
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes
git config --global user.email "jee_bai@163.com"
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes
git init
Initialized empty Git repository in E:/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes/.git/
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master)
git add .
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master)
git commit -m "TGRS work files"
[master (root-commit) 7066848] TGRS work files
156 files changed, 25787 insertions(+)
create mode 100644 “ExampleFiles/\350\257\225\351\252\214XXXXX_X_0_Y_0_20221019_18_30_45_ch23_3_556.csv”
create mode 100644
create mode 100644 Rclonte-M/finalParas.xlsx
create mode 100644 measuredDataDecompositionRclonte_M.py
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master)
git remote -v
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master)
替换为自己要上传的仓库的git链接
git remote add origin git@github.com:Jie-Bai/Rclonte-M-TGRS.git
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master)
git push -u origin master
Enumerating objects: 165, done.
Counting objects: 100% (165/165), done.
Delta compression using up to 16 threads
Compressing objects: 100% (165/165), done.
Writing objects: 100% (165/165), 15.49 MiB | 1.70 MiB/s, done.
Total 165 (delta 73), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (73/73), done.
remote:
remote: Create a pull request for ‘master’ on GitHub by visiting:
remote: https://github.com/Jie-Bai/Rclonte-M-TGRS/pull/new/master
remote:
To github.com:Jie-Bai/Rclonte-M-TGRS.git
- [new branch] master -> master
branch ‘master’ set up to track ‘origin/master’.
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes (master)
$
以下内容为为了防止上面链接【如何解决:ssh: connect to host github.com port 22: Connection refused 】消失而截图保存的一些内容,主要为创建SSH以及和本地链接的过程。
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes
$ ssh-keygen -t ed25519 -C “jee_bai@163.com”
Generating public/private ed25519 key pair.
Enter file in which to save the key (/c/Users/Lenovo/.ssh/id_ed25519):
Created directory ‘/c/Users/Lenovo/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Lenovo/.ssh/id_ed25519
Your public key has been saved in /c/Users/Lenovo/.ssh/id_ed25519.pub
The key fingerprint is:…………………
The key’s randomart image is:
…………………………
|.o. |
|…E. . |
|… .o o o . |
|. o. = = o |
|. . o.= S o |
| + . B . |
|o +.@ + * . . |
| …o X . B . |
| …* o o. |
±—[SHA256]-----+
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
https://blog.csdn.net/hjy_mysql/article/details/131596257
Host github.com
Hostname ssh.github.com
Port 443
Lenovo@hero MINGW64 /e/AIRCAS/CopenSourceCode/3 Rclonte-M-TGRS/Codes
$ ssh -T git@github.com
The authenticity of host ‘[ssh.github.com]:443 ([20.205.243.160]:443)’ can’t be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type ‘yes’, ‘no’ or the fingerprint: yes
Warning: Permanently added ‘[ssh.github.com]:443’ (ED25519) to the list of known hosts.
Hi Jie-Bai! You’ve successfully authenticated, but GitHub does not provide shell access.