git ssh/git status报错

1.生存密钥:

$ ssh-keygen -t rsa -C “[email protected]

按3个回车,密码为空。

在github上添加ssh密钥,这要添加的是“id_rsa.pub”里面的公钥

 测试是否成功:ssh [email protected]

The authenticity of host ‘github.com (207.97.227.239)’ can’t be established.

RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘github.com,207.97.227.239′ (RSA) to the list of known hosts.

ERROR: Hi tekkub! You’ve successfully authenticated, but GitHub does not provide shell access

Connection to github.com closed.


2.git status报错

本地获取远程的变更(只是获取,尚未合并):git remote update或者git fetch origin

接着,git status -uno:可以让你看到当前分支是否领先/落后/分叉于它跟踪的远程分支

或者,git show-branch *master:可以让你看到所有名字最后是 master 的分支的 commits,因此你可以看到 origin/master 和 master 在 commits 层面上的差异

最后,git diff origin/master:可以让你看到 origin/master 和 master 在代码(文件)层面上的差异

你可能感兴趣的:(git ssh/git status报错)