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
4,364,842
Community Members
 
Community Events
168
Community Groups

i have an error during puch code

Edited

$ 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 https://bitbucket.org/<workspace-id>/<repo-slug>.git (fetch)
origin https://bitbucket.org/<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>@bitbucket.org/<workspace-id>/<repo-slug>.git

where
<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 bitbucket.org 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,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events