fatal: remote error: Insufficient permissions

Jefferson Ackor April 1, 2014

I have a Stash user authenticating via AD who has write access to a project and is unable to push to a specific repository. He's able to push to repositories in other projects. SSH is setup correctly; cloning is fine, but pushing results in fatal: remote error: Insufficient permissions

You do not have permission to push to the repository retailpaymentservices in

project Fully Governed Enterprise Services

fatal: Could not read from remote repository.

3 answers

1 accepted

1 vote
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 1, 2014

Has the SSH key been added to the user's account (User Profile > SSH keys)? You can do a quick check by having the user do:

ssh -p <ssh-port> <ssh server> whoami

for instance

ssh -p 7999 stash.server.comwhoami

Jefferson Ackor April 1, 2014

Thanks Michael, it has. difference being that we redirect 22 => 7999 via BigiP.

Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 1, 2014

Ok, that eliminates one potential issue.

I've just checked the code paths and that error message is written when

  • the user is authenticated
  • and the user has read access to the repository
  • but the user does not have write access

So, I'd double check the permissions on the project in question and the user's group memberships to make sure it's all set up correctly.

From earlier answers it sounds like you've already double-checked this. Assuming everything is set up correctly and it's still not working, it might be a bug. Perhaps https://jira.atlassian.com/browse/CWD-3796?Do you have multiple User directories set up for Stash?

Jefferson Ackor April 1, 2014

Just one AD directory. I've given this user write access via group and as an individual user, with no success. Thanks again for your suggestions.

Jefferson Ackor April 2, 2014

Wow...I am chagrined. Please accept my apologies for wasting the community's time on this and set my karma points to -50. Turns out my remote developer was using someone elses SSH keys. (not kidding).

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2014

I expected it to be something trivial but this is still quite surprising. :D

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 1, 2014

Two ideas:

- Are the write permissions given to a group that the user should belong to, but actually does not? (You can check the group memberships if you open the user's details in Administration/Users on the web interface.)

- It is possible that some branch permissions setting prevents the user from pushing to the branch they were trying to push to. (Repo's page -> Settings/Branch permissions)

Jefferson Ackor April 1, 2014

Balazs, thanks for your response. user does have group membership and there are no explicit repository, branch permissions or hooks that would prevent this push. probably something simple, but unable to solve it so far.

0 votes
Jefferson Ackor April 1, 2014

This project and its repositories are working fine for other users with write access. Thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events