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

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.

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.

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.

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 Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

710 views 3 2
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