Add users to a Git project

5

I have the following problem .. on a server I have a project and it is in a Bitbucket repository.

If I do git shortlog -sn

I'm ready:

36  root
 4  Mi User

I need to add another authorized user from Bitbucker to commit and push

    
asked by sioesi 30.08.2018 в 16:36
source

2 answers

5

You must go to Settings -> User and group access -> Users and add the user by mail. Remember that the user must be registered in bitbucket to appear in the list.

Here is an image for you to guide:

Also check that the url of the repository does not contain your user. Execute the following command:

git remote -v

If your user appears in the url then you have to edit and change it by the user who will use the repository. This is done with the following command:

git remote set-url origin  https://<nombre_de_tu_cuenta>@bitbucket.org/<la_nueva_cuenta>/<nombre_repositorio>
    
answered by 30.08.2018 / 16:44
source
1

you can change user

open git bash and configure the email and the name of your other user

git config --global user.email "jp@gmail.com"

git config --global user.name 'JuanPerez'

and you can verify the user with whom you are with

git config --list
    
answered by 30.08.2018 в 16:54