git clone OK but git push KO

0

I have a new instance of gitlab on a remote server and everything seems fine except when I want to push an internal project.

From my computer I do :

$ git clone git@mygitlabexample.test.com:anamespace/test.git
Cloning into 'test'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.

$ cd test

$ echo "some text" >> test
$ git add test && git commit -m "this is a test"
[master 24cba0f] this is a test
1 file changed, 1 insertion(+)
$ git push
GitLab: You are not allowed to push code to this project.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I don't understand why rights would be different between clone and push in my case.

Edit : I've modified my repo from internal to public and I still have the push problem...

To check if my issue was linked to some configuration on my laptop I tried to clone the same repo on another server and I have the exact same problem (edited)

Any hint ?

Banibal

Posted 2019-05-13T10:22:38.143

Reputation: 1

1What member role does your user have on that particular project? (Check Settings » Members) – slhck – 2019-05-13T11:50:20.523

Answers

0

It appears that having 2 ssh keys registered in my ssh agent was a problem. I don't understand why, whereas it worked with another instance of Gitlab before, but as soon as I ssh-add -D everything worked fine.

Banibal

Posted 2019-05-13T10:22:38.143

Reputation: 1