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
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
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?:
Let us know,
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.