I set up a git project on projectlocker to push my git files to. Then I went into the directory where I had initialized a git project and staged my files. And finally I tried to push the project to projectlocker with this command:
$ git push [email protected]:helloworld.git
It generates this error:
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
Is there something wrong with trying to push this way?
I found an example of someone using this syntax:
git remote add myproject '[email protected]:myproj.git'
git push myproject +master:master
Is it necessary to use "remote add
" - why can I not push directly to the URL as I did above?