tags:

views:

1131

answers:

4

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?

+2  A: 

Your real problem was buried in the warning message

ERROR:gitosis.serve.main:Repository read access denied

Make sure that you have the ability to access the repository

Rob Di Marco
+10  A: 

This is the real error. You don't have read access to the repository?

ERROR:gitosis.serve.main:Repository read access denied

The rest are just warnings. If you want to get rid of the warnings, do this:

git push [email protected]:helloworld.git [branchname]

If you want Git to push the current branch when [branchname] is not specified without warning, do this:

git config push.default current
Ramkumar Ramachandra
A: 

Hi, I'm with ProjectLocker. You can file a ticket in ProjectLocker Portal and we can look at your project and make sure there's not an issue on our end preventing you from accessing your repository.

brokenbeatnik
A: 

Also, make sure to add yourself to the project from within your ProjectLocker account itself. Do this by clicking on "List Account Users" in the left pane, check that you are listed as one of the users (probably as admin?), and then click on "List Projects", select the project name (NOT the Edit link), and under the heading "Users in Project" you should see yourself listed. If you're not there, add your userid to the particular project you are trying to sync with, otherwise ... no go. Incidentally, this is also how you control who else has access to the project, i.e. read / write permissions.