我在 projectlocker 上设置了一个 git 项目来将我的 git 文件推送到。然后我进入初始化 git 项目并暂存文件的目录。最后,我尝试使用以下命令将项目推送到 projectlocker:
$ git push git-smichaels@free5.projectlocker.com:helloworld.git
它会生成此错误:
warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated. This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: avoid seeing this message again, by configuring 'push.default' to:
warning: 'nothing' : Do not push anything
warning: 'matching' : Push all matching branches (default)
warning: 'tracking' : Push the current branch to whatever it is tracking
warning: 'current' : Push the current branch
ERROR:gitosis.serve.main:Repository read access denied
fatal: The remote end hung up unexpectedly
试图以这种方式推动有什么问题吗?
我找到了一个使用这种语法的人的例子:
git remote add myproject 'git-myloginname@projectlocker.com:myproj.git'
git push myproject +master:master
是否有必要使用“ remote add
” - 为什么我不能像上面那样直接推送到 URL?