【发布时间】:2015-12-01 00:02:08
【问题描述】:
我正在使用 gitlab 来管理我的代码。
当我使用 git bash 管理我的代码时,它可以成功提交并将代码推送到服务器。
我在 git bash 中使用的代码如下:
git add .
git commit
git push -u origin master
但是,当我在 Qt creator 中提交项目时,作者信息不会自动填写。
( click here for the capture image 1)
另外,我在 Qt creator 的 git 选项中点击 push。如:
(click here for the capture image 2)
发送代码到服务器失败,错误信息如下:
14:20 Executing in H:\0000ybzhao\Programming\00.git\pairSam2Bed: C:\Program Files\Git\bin\git.exe push
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The command "C:\Program Files\Git\bin\git.exe" terminated with exit code 128.
有没有人知道为什么会发生这种情况或如何解决这个问题?
提前致谢。
【问题讨论】: