git push Everything up-to-date
在github上git clone一个项目,在里面创建一个目录,然后git push的时候,出现报错"Everything up-to-date"
原因:
(1)没有git add .
(2)没有git commit -m "提交信息"
如果上面两个步骤都成功执行,还出现这个错误是因为创建的目录下是空的,目录下必须有文件才能git push上传成功。
在github上创建文件的时候,在新文件名后加/符号就是文件夹,但是这种方式只支持英文名目录,中文名目录不支持。
解决提交到github报错Please tell me who you are.和为不同的项目设置不同的名称
Can't finish GitHub sharing process
Successfully created project 'Test' on GitHub, but initial commit failed:
*** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for (null)>) not allowed during executing git -c core.quotepath=false commit -m "Initial commit" --
看了一下原来是git没有配置的原因,找到git目录下的Git Bash运行,输入下面两行代码即可
git config --global user.email "you@qq.com"
git config --global user.name "Your Name"
然后我根据网上搜索的方法进行尝试,试了很多都不行,最终找到了一个可行的。
通过这个命令进行尝试连接码云,
$ ssh -T git@gitee.com
会报出如下错误:
Permission denied (publickey).
或者是:
Warning:Permanently added ‘git@’ to the list of known hosts permission denied (publickey)
或者:
Warning: Permanently added the ECDSA host key for IP address '218.11.0.86' to the list of known hosts.git@gitee.com: Permission denied (publickey).
二、解决方案
下面这篇文章就是指导我解决问题的文章,这篇文章是设置GitHub的,但是码云设置的方法一样。
https://www.cnblogs.com/qcwblog/p/5709720.html
1,生成公钥,注意“”中的账号必须是码云的登录账号,我就是因为第一次输入了lyj而失败的
$ ssh-keygen -t rsa -C "694570206@1qq.com"
随后出现如下命令,路径可以不用修改,直接回车就行
Enter file in which to save the key (/root/.ssh/id_rsa):
接下来输入两次密码,回车表示不设置密码:
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
表示成功
2,然后在终端中打开id_rsa.pub文件,把以ssh-rsa 开头 以刚才输入的账号hncjliyingjie@163.com结尾的key 复制下来。
3,在码云上添加刚刚生成的公钥 ,账号-设置-安全设置-ssh公钥