Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to push in repository

Aisha Zafar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2019

I have read,write and admin rights to a repository created by our administrator. Its being a day that I am trying to push my code using source tree but facing problem to push. Please tell what will be the user name before repo name. It will be the owner name of the repository or the user who is login to push.

Following is the error I get while pushing code.

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream repo master:master
remote: Forbidden
fatal: unable to access 'https://user@bitbucket.org/user/repo/': The requested URL returned error: 403

2 answers

0 votes
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2019

Hello @Aisha Zafar

Please tell what will be the user name before repo name.

It should be the account owning the repository, i.e. same to what you see in the browser URL when you navigate to that repository.

The user who is pushing, however, can also be in the push URL in case you're using HTTPS transport (and from your error message I can see you are). Let's look at an example:

https://dpenkin@bitbucket.org/atlassian/atlaskit-mk-2.git

This would be my URL to fetch/push to this repository. So, atlassian is the account owning atlaskit-mk-2 repository, and dpenkin is my own username – it is before the @ character which means it is used for authentication.

Now, the error you get back is actually 403 (Forbidden). This means you've authenticated correctly (e.g. Bitbucket knows who you are) but you're not authorized to perform the operation you're trying to do (e.g. you don't have enough permissions). Can you check Repository Details section in the right sidebar on the repository source view and confirm you have Write or Admin access?

Hope this helps.

Cheers,
Daniil

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2019

Hi @Aisha Zafar , welcome to the Community!

When you push to someone else's repo you need to use your username and password. If you have the right permissions and the credentials are correct, the operation should be successful.

We'll need some more details to be able to troubleshoot this issue for you. Can you answer the following?:

  1. Can you make sure your credentials are correct by logging to your Bitbucket account via the browser?
  2. If you try pushing from the command line, do you get any error?
  3. Have you tried performing any other operation, apart from push?

Let us know,

Ana

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events