how to give write access for other users

curently in one of my repository has three people within it. problem is admin is the only person who can has write access for the repository. for other two users only have read access. but when they see the permission status for the repository , it show as write . when they pushing commits to the repository , they can see access key only has read permission error.

 

following permission were defined in repository by me. please help me to figure out this problem. 

user_group_access.png

bit_bucket_access_keys.png

2 answers

1 accepted

1 votes

Hello @buddhika,

What is the repository URL users are pushing against? Perhaps they are pushing over SSH where the SSH key added in Bitbucket server was with Read-only access.

In the screenshot you have provided, please ask the user go to /d/project.security-management-system (master) in mingw-w64 or Git Bash and run:

git config -l

And check what is described in remote.origin.url

Thank you,
Rafael

HI @Rafael Sperafico,

following configurations were found once execute the git config -l command. but couldn't able to found a issue here. please help me to figure our this issue.

git.PNG

 

 

Thank You,

Best Regards.

Hello @buddhika,

Thank you for your update.

Based on screenshot provide we can notice your repository is hosted on https://bitbucket.org and not on Bitbucket server.

You could proceed as per following:

a. Connecting to the repository over HTTPS instead of SSH

  • go to the directory where repository was cloned
  • update remote.origin.url to point to HTTPS instead
    # Change your remote's URL
    # make sure of replacing USERNAME with desired user
    git remote set-url origin https://USERNAME@@bitbucket.org/buddhikabhageashwara/security-management-system.git
  • attempt on pushing something to repository

b. Troubleshooting SSH connection

  • go to the directory where repository was cloned
  • enable DEBUG by typing in:
    # enable Git DEBUG
    export GIT_TRACE_PACKET=1 export GIT_TRACE=1 export GIT_CURL_VERBOSE=1
  • attempt on pushing something to repository
  • review the SSH key used to connect to repository by running the following command:
    ssh -v bitbucket.org

Kind regards,

Rafael

Hi @Rafael Sperafico,

many thanks for the solution, this is working fine.

Thank You,

Regards.

0 votes

Hi Bud

Can you post the error the users are seeing?  From what you're describing it sounds like it may be the following error:

Permission denied (publickey).
fatal: Could not read from remote repository.

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

If that is the error take a look at the Permission denied (publickey) knowledge base article for steps to fix the issue.  If that is not the error or that does not help let us know and we'll go from there.

Cheers,

Branden

Hi @Branden McElveen,

thanks for the quick response, that is not the error what have you mentioned in here. please find the above mentioned error for the write access when oshan and bhanuka try to write on the repository .

please find the text format of the error message from follwoing  which getting the users:-

$ git push origin masterrepository access denied. access via a deployment key is read-only.fatal: Could not read from remote repository.
Please make sure you have the correct access rightsand the repository exists.

thank you,

regards.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

651 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot