2

I trying to push my local branch code to the master of a new repo. These are Gitlab repos. But I keep getting this error -

remote: You (@user) must accept the Terms of Service in order to perform this action. Please access GitLab from a web browser to accept these terms. fatal: unable to access 'https://gitlab.com/project/project-ios.git/': The requested URL returned error: 403

@user is not me. I don't know what is happening.

I committed my local branch, open another remote on gitlab and on terminal wrote

git push https://gitlab.com/new_project/new_project-ios +local_branch:master

which I found here!.

The person @user was working on a different repo before me. The repository I'm working in is created a few months ago and this person was not added as a member.

Somoy Das Gupta
  • 1,874
  • 1
  • 16
  • 19

1 Answers1

2

@user is not me

That means your local Git installation must use a credential helper which has cached the credentials for "user"

git config credential.helper

You could either:

  • use an SSH URL (git remote set-url origin git@gitlab.com:new_project/new_project-ios), provided you have registered your SSH key to your GitLab account
  • or delete the credentials:

     git credential-manager reject gitlab.com
    

(on MacOS: see "Managing Remotes / Updating credentials from the OSX Keychain Updating credentials from the OSX Keychain")

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250