Access forbidden

182 views
Skip to first unread message

Joe Kasstek

unread,
Sep 17, 2015, 8:24:45 AM9/17/15
to gitblit
Hi All,

I moved my giblet server to a different server a short while back and I believe it was all working at that time, but did not do many commits until now, so not sure.

However, I have updated the ip/host for this new server in the .git/config and any time I try to push to origin, I get a 'fatal: remote error: Git access forbidden'

I added a new user and tried to clone and then push to that NEW repo and get same error.  I do not see anything in the logs to pinpoint the issue.

Thanks.

Peter

James Moger

unread,
Sep 17, 2015, 8:33:25 AM9/17/15
to git...@googlegroups.com
Hi Peter,

Obviously there are a million variables here.  Let's start with: were you able to clone the new repo you created?

-J


--
You received this message because you are subscribed to the Google Groups "gitblit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitblit+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joe Kasstek

unread,
Sep 17, 2015, 8:36:53 AM9/17/15
to gitblit
James,

Yeah, as soon as I sent this I figured I would add:

1.  v1.6.2
2.  non ssh access (standard git)
3.  i was able to clone the new repo, but it did have some error messages ... I will clone another new one and post back what I see

Sorry for being less verbose.

Peter

Joe Kasstek

unread,
Sep 17, 2015, 9:11:39 AM9/17/15
to gitblit
Ok, created new 'test repo'.

Cloning into 'testrepo'...

Checking connectivity... done.

warning: remote HEAD refers to nonexistent ref, unable to checkout.


add a test file, then committed and tried to push:


macdev:testrepo $ git commit -m "test"

[master (root-commit) 0c4031b] test

 1 file changed, 2 insertions(+)

 create mode 100644 junk

macdev:testrepo $ git push remote

fatal: 'remote' does not appear to be a git repository

fatal: Could not read from remote repository.


changed to push -u (not had to do that before) ..


macdev:testrepo $ git push -u origin master

Counting objects: 3, done.

Writing objects: 100% (3/3), 206 bytes | 0 bytes/s, done.

Total 3 (delta 0), reused 0 (delta 0)

remote: Updating references: 100% (1/1)

To http://ho...@192.168.1.10:8086/r/testrepo.git

 * [new branch]      master -> master

Branch master set up to track remote branch master from origin.


This seemed to work for this new repo, but trying even -u on push and still get:



macdev:$ git push -u origin

fatal: remote error: Git access forbidden

macdev:$ 



On Thursday, September 17, 2015 at 8:33:25 AM UTC-4, James Moger wrote:

James Moger

unread,
Sep 17, 2015, 10:26:41 AM9/17/15
to git...@googlegroups.com
You use git push -u origin master to setup the tracking relationship between master in your local repo and master in the remote (origin) repo (-u means set upstream tracking relationship).  Once you have established this relationship you do not repeat it so you should be using plain git push, if you are on your local master branch.

If you change branches locally and want to push your new local branch to your remote (origin) then (again) you'll need to setup a relationship from your local branch to the remote branch with git push -u origin my_branch_name.

I should note that if you had chosen to add a readme or a gitgnore when the repo was created you would not need to use push -u on the master branch at all because git will have already pre-configured the relationship during the clone.

HTH,

-J


Reply all
Reply to author
Forward
0 new messages