git使用笔记

 The authenticity of host 'gitee.com (120.55.226.**)' can't be established.

>> git clone [email protected]:haiseason/JavaShiXun.git
Cloning into 'JavaShiXun'...
The authenticity of host 'gitee.com (120.55.226.**)' can't be established.
ECDSA key fingerprint is SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbV**********.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'gitee.com,120.55.226.**' (ECDSA) to the list of known hosts.
Bad packet length 1186263935.
ssh_dispatch_run_fatal: Connection to 120.55.226.** port 22: Connection corrupted
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

解决:

>> ssh -o StrictHostKeyChecking=no 120.55.226.24
PTY allocation request failed on channel 0
Hi [33;01mAnonymous[0m! You've [32msuccessfully[0m authenticated, but GITEE.COM does not provide shell access.
Note: Perhaps the current use is [33mDeployKey.[0m
Note: DeployKey only supports [33;01mpull/fetch[0m operations
Connection to 120.55.226.24 closed.
>> git clone [email protected]:haiseason/JavaShiXun.git
Cloning into 'JavaShiXun'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 11 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (11/11), done.
Resolving deltas: 100% (2/2), done.

 

 DeployKey does not support push code

>> git push origin master
Access denied: DeployKey does not support push code
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

解决:

>> ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\admin/.ssh/id_rsa):

一直按回车 
之后打开C:\Users\admin/.ssh/id_rsa.pub 复制到个人的SSH公钥内而不是项目的

git使用笔记_第1张图片

 

git 图表显示分支状况:

git log --graph --pretty=oneline --abbrev-commit

git使用笔记_第2张图片

 

你可能感兴趣的:(git)