Create Repository Failed

When creating a new BitBucket repository from SourceTree I recieve the following error:

An error occurred while trying to create the repository. The error reported by the server was:

Forbidden (403)

CSRF verification failed. Request aborted.

You are seeing this message because this HTTPS site requires a 'Referer header' to be sent by your Web browser, but none was sent. This header is required for security reasons, to ensure that your browser is not being hijacked by third parties.

If you have configured your browser to disable 'Referer' headers, please re-enable them, at least for this site, or for HTTPS connections, or for 'same-origin' requests.

More information is available with DEBUG=True.

4 answers

This widget could not be displayed.

Hmm, I've just tried this here and it worked fine (I just created a public git repo on my BB account anyway).

Can you try it again? Maybe it was a temporary problem on BB. If it still doesn't work, please provide the full details you were using so I can try to reproduce it and report to the BB team.

This widget could not be displayed.

I've been having the same trouble for a few weeks now, here's the console output when I try to create a repo:

7/14/12 7:46:06.606 AM SourceTree: Error: Error Domain=YAJL Code=3 "lexical error: invalid char in json text.
" UserInfo=0x400e193c0 {NSLocalizedDescription=lexical error: invalid char in json text.
}

That actually looks like a different error. SourceTree 1.5 is out later today, please can you try that when it's available to see if the behaviour is any different? We added support for creating repos under BB Organisations too and expanded the diagnostics a bit, I still haven't been able to reproduce this yet.

This widget could not be displayed.

Having the same problem here, same error message.

For me, I get the error when I go to add a remote repository, click the "hosted projects" button, click "Create New Repository", then attempt to actually create the repository after going through the dialog and filling in the fields.

How does one reproduce the debug info? If I could, I would include it here as well. Screenshot included to show what results:

I'll see if the Bitbucket team has any input on what might cause this CSRF failure.

This widget could not be displayed.

Launch your console (easist to just spotlight it or Applcations->Utlities->Console) and do a search for sourcetree

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

873 views 2 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you