Install SourceTree without an Atlassian account?

55.1k views Asked by At

I'm trying to use SourceTree for a class that I'm teaching. In order to do that we need to install SourceTree onto the school's Windows computers.

When we try to install SourceTree (Version 1.9.10.0) it demands an Atlassian account before it will start. Obviously this is wrong - since we're trying to install SourceTree onto a shared computer (into a VM, to be specific) we don't have just one account (and, on top of that, we're using SourceTree with GitLab, not BitBucket/Atlassian, so we don't need their account anyways).

Is it possible to install SourceTree but skip the 'create an Atlassian account' step during the install process?

(We'd be ok with having the students create accounts later on, when they first start using it - we just don't want all the students to share a single BitBucket account by default)

10

There are 10 answers

11
pedrorijo91 On BEST ANSWER

I don't think SourceTree allows to install without using an Atlassian Account. I've also tried and couldn't make it.

Have a look at Github Desktop, I think it allows not to configure an account https://desktop.github.com/

(I also prefer the UI from what I've seen - CLI still rules)

Edit: keep in mind that's easier for the students to google by themselves solutions to problems with git using the CLI than using UI apps

0
Bekko On

I just noticed that you can skip the registration in the current version 3.3.9 with a new button. But this seems not to be documented.

https://product-downloads.atlassian.com/software/sourcetree/windows/ga/ReleaseNotes_3.3.9.html

Update 17.09.20: I took screenshots from the versions 3.3.8 and 3.3.9 to show the differences. I wasn't able to run the installer in English so I can only provide this German version. ("Überspringen" means "to skip")

Installation of version 3.3.8

Installation of version 3.3.9

1
stormwild On

Thanks to Mike for mentioning the version of SourceTree that did not require a login.

It's possible to install SourceTree v1.6.4 which does not require a login to an Atlassian acount.

How to install SourceTree v1.6.4 for Windows

How to install SourceTree v1.6.4 for Windows

This gist shows how to install SourceTree without having to login to an Atlassian account.

Later versions of SourceTree after v1.6.4 require a login to an Atlassian account.

Steps:

  • Install Chocolatey
  • Install SourceTree 1.6.4 using Chocolatey

Install Chocolatey

  • Run Windows Powershell as Administrator
  • Run the following command Set-ExecutionPolicy Bypass; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Install SourceTree Using Chocolatey

Run the following command within an administrative console/terminal/powershell.

choco install sourcetree --version 1.6.4

References

0
Pawel On

2020 update No admin, no installation, no registration

Here's a script that downloads version 3.3.8, unpacks MSI and copies config files to %APPDATA% to skip registration

https://github.com/DVLP/sourcetree-portable-bypass-registration

Download as ZIP, in powershell run sourcetree_portable.ps1

$version="3.3.8"
$url="https://product-downloads.atlassian.com/software/sourcetree/windows/ga/SourcetreeEnterpriseSetup_$($version).msi"
$client = New-Object System.Net.WebClient

echo "Downloading sourcetree"
$client.DownloadFile($url, (Get-Item -Path ".\").FullName + "\sourcetree.msi")
mkdir sourcetree
$msi = (Get-ChildItem "*.msi" | select  -Last 1).fullname
$target = (Get-Item -Path ".\sourcetree").FullName

echo ""
echo "Unpacking..."
msiexec /a $msi /qb TARGETDIR=$target
Start-Sleep -s 5

echo "Opening and closing SourceTree.exe to create default directories..."
$exe = (Get-ChildItem -Recurse "./SourceTree.exe" | select  -Last 1).fullname
& $exe
Start-Sleep -s 5
echo "Waiting 10s. Don't close SourceTree, it will close itself."
Start-Sleep -s 10

echo "Killing SourceTree"
kill (Get-Process SourceTree).id

echo "Finding installation directories"

$userConfPath=(Get-ChildItem -LiteralPath $env:LOCALAPPDATA\Atlassian -Recurse -Directory -Filter $version* -Force).fullname

echo "Copying config files (sign-in bypass)"
Copy-Item ".\user.config" -Destination $userConfPath
Copy-Item ".\accounts.json" -Destination $env:APPDATA\Atlassian\SourceTree

echo "Flattening folder"
Get-ChildItem -Path .\sourcetree\ProgramFiles\Atlassian\Sourcetree -Recurse | Move-Item -Destination .\sourcetree
# Start-Sleep -s 2

echo "Cleaning up"
rm $msi
rm .\sourcetree\sourcetree.msi
rm -Recurse .\sourcetree\ProgramFiles

Read-Host -Prompt "Press Enter to exit"
2
Michael Ozeryansky On

I just discovered you need an account to access the app, but you can logout and still be able to use the app.

0
Gomathi Nayagam On

You can create a temp account by using a temp email. Then you can delete the account once its installed and use your own corporation git ids. It is the easiest way.

0
tobster On

I managed to avoid registration with the current version as of today, which is 3.3.8.

All you need is yet an already mentioned 'accounts.json' placed in %AppData%\Atlassian\SourceTree\accounts.json (look carefully, it's now %Appdata% not %Local...%)

The file I used prepares a GitHub account with OAuth (you will need to apply some fresh OAuth from the edit accounts dialog). You can also delete that account and do what you like.

[
  {
    "$id": "41",
    "$type": "SourceTree.Model.ScmAccount, SourceTree.Api.Host.Scm",
    "IsDefault": false,
    "Authenticate": true,
    "HostInstance": {
      "$id": "42",
      "$type": "SourceTree.Host.GitHub.GitHubInstance, SourceTree.Host.GitHub",
      "Host": {
        "$id": "43",
        "$type": "SourceTree.Host.GitHub.GitHubHost, SourceTree.Host.GitHub",
        "Id": "github"
      },
      "BaseUrl": "https://github.com/",
      "Protocol": "HTTPS"
    },
    "Credentials": {
      "$id": "44",
      "$type": "SourceTree.Api.Account.OAuth.TwoZero.OAuthTwoZeroCredentials, SourceTree.Api.Account.OAuth.TwoZero",
      "AuthenticationScheme": {
        "$type": "SourceTree.Api.Account.OAuth.TwoZero.OAuthTwoZeroBearerAuthenticationScheme, SourceTree.Api.Account.OAuth.TwoZero",
        "Name": "OAuth",
        "Description": "OAuth Token",
        "HeaderValuePrefix": "Bearer",
        "UsernameIsRequired": false
      },
      "Id": null,
      "Username": "github-username",
      "DisplayName": "Your Name",
      "Email": null,
      "AvatarURL": "https://cdn3.iconfinder.com/data/icons/inficons/128/stackoverflow.png",
      "EmailHash": null
    }
  },
  {
    "$id": "18",
    "$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity",
    "IsDefault": false,
    "Authenticate": true,
    "HostInstance": {
      "$ref": "42"
    },
    "Credentials": {
      "$ref": "44"
    }
  }
]
7
ws_ On

Updated 2020-11-27

Happy to see that SourceTree allow users to skip the login procedure in version 3.3.9.

For older versions:
SouceTree uses accounts.json file to store account settings.
It would skip the login process if there is an accounts.json file in your machine.
So you can copy the accounts.json file in %AppData%\Atlassian\SourceTree\ to any other machine to skip the login procedure.

0
Mike On

Can confirm that SourceTree V 1.6.14.0 does NOT require an account... so this is why I hit never update for an old version on my other computer ;)

I am not 100% sure if that is the latest version that still has this feature, but works for my purposes.

0
yike8 On

https://github.com/yike8/sourcetree-skip-bitbucket-registration

How to skip bitbucket registration when installing sourcetree?

The first step is to run SourceTreeSetup-3.1.3.exe and close it after popping up the registration interface.

The second step is to open the %LocalAppData%\Atlassian directory, find accounts.json and user.config, and replace them with the files I provided.

e.g.

%LocalAppData%\Atlassian\SourceTree\accounts.json

%LocalAppData%\Atlassian\SourceTree.exe_Url_iayhtc13zv3obzuz5vchezjs1az2q5ef\3.1.3.3158\user.config