0

I am unable to push or clone with HTTPS in any git repo where I am Maintainer and have merge and push access.

When pushing, I get:

remote: You are not allowed to upload code.
fatal: unable to access '[https://someURL.de/id/project-name.git/]': The requested URL returned error: 403

(Note: The actual link this error gives is a valid url to a project on gitlab that i have access to on the web browser)

When cloning HTTPS, I get something similar:

cloning into '[project name]'...
remote: The project you were looking for could not be found.
fatal: repository '[https://someURL.de/id/project-name.git/]' not found

Here is a recreation of the problem:

  1. I make sure I am logged into the correct git account, linked with gitlab. I have checked on Gitlab to confirm that I have the proper permissions
  2. I make changes on a branch and commit but it doesnt say anything is added.
  3. I now push these non changes, and instead of the Terminal telling me there is nothing to push, I get this lovely error that I posted up top

The last time I attempted to commit and push (3 days before this post), it worked perfectly and nothing had changed on my end.

So to recap, this is happening to all repos now.

Does anyone have a solution for this?

Let me know if I can provide further info.

Ian S
  • 1,155
  • 2
  • 14
  • 39

1 Answers1

2

If nothing is wrong with the GitLab server itself, the problem is probably related to Git credential caching on the local client. I've seen this problem many times and it's often perplexing. Git can hold on to credentials like you wouldn't believe.

Try specifying your GitLab username specifically in the URL, to force the client to use the right credentials - git clone https://your-username@someURL.de/id/project-name.git. This will still fail if the Git client is remembering the wrong password for your username, but it will work if the client was caching the wrong username, too.

If that doesn't work, you can also put the password in the URL, but I suggest you only do this as a test, as it's really not good practice. The command would then be git clone https://your-username:your-password@someURL.de/id/project-name.git.

If either of the above work, you know it's the credential cache causing problems. There is a thread about removing credentials from the cache at Remove credentials from Git.

If you still have problems then you should look at the logs on the GitLab server.

Drew Blessing
  • 2,147
  • 8
  • 15