【发布时间】:2023-03-26 14:13:01
【问题描述】:
我在 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
这样推有什么问题吗?
我发现 an example 有人使用这种语法:
git remote add myproject 'git-myloginname@projectlocker.com:myproj.git'
git push myproject +master:master
是否有必要使用“remote add” - 为什么我不能像上面那样直接推送到 URL?
【问题讨论】: