Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

i have an error during puch code


$ git push origin master
remote: Forbidden
fatal: unable to access 'repo_url': The requested URL returned error: 403

1 answer

0 votes

Hi @Developer and welcome to the community.

First, I wanted to give you a heads up that I removed the repo URL from your post for privacy reasons.

Regarding the issue you are facing:

1. I noticed that the repo URL in the output does not include your username. If you run the following command in the directory of your clone:

git remote -v

do you see your Bitbucket username listed in the URL?

If not, I would suggest changing this URL to include your username. E.g. if the output of the command git remote -v is something like this:

origin<workspace-id>/<repo-slug>.git (fetch)
origin<workspace-id>/<repo-slug>.git (push)

You can change it to include your username with the following command:

git remote set-url origin https://<Bitbucket_username><workspace-id>/<repo-slug>.git

<Bitbucket_username> replace with your Bitbucket username
<workspace-id> replace with the workspace id that owns this repo
<repo-slug> replace with the reposiotry slug, which in this case is the repo name

If your remote's name is other than origin, then replace the name origin with the name of your remote.

2. If the issue persists after you make this change, I would suggest checking for any stored credentials for if there is a credential manager on your computer, and remove them.

Then, next time you push, you should be asked for a password and you can provide either your account's password or an app password with permissions to write to repositories.

Please feel free to let me know how it goes.

Kind regards,

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events