Updating SourceTree Git Login Credentials

At work we use Git for versioning our code. We also use the suite of Atlassian products for managing tasks, code, and deployment. As such I use SourceTree a lot to manage my code. We’re also security conscious and so we have to change our passwords every couple of months – however this then breaks SourceTree.

What I mean is, when I change my password SourceTree doesn’t remember the change and so I have to enter it every. single. time.

Having Googled how to solve this 3 or 4 times now I thought I’d make a note on my blog so I can more quickly find the solution (hopefully the act of writing it down will mean I won’t have to Google it again).

The solution is actually quite simple once you realise – but doesn’t use any of SourceTrees dialogs.

  1. Open SourceTree and navigate to the repository you want to update the password of
  2. Run the ‘Actions > Terminal’ command to jump to the location of the repo on the command line
  3. Enter ‘Git Pull’ and hit return to update the repository
  4. When requested enter your password
  5. Done

So, if you want SourceTree to change password then you can’t do it with the GUI. You have to use the command line interface instead.

How was it for you? Let me know on BlueSky or Mastodon

(Please) Link to this page

Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.

Related Posts

25 Jun 2017

Using Git Hooks to Clear Cloudflares Cache

I have a couple of sites powered by Jekyll on Github pages, and I use Cloudflare to help make them nice and speedy (and to get around the github pages traffic limits). However, this means that each time I update...
27 Oct 2013

WordPress Numeric Pagination

I’ve made quite a few WordPress themes in my time, and so I thought I would write a few blog posts sharing some of the code snippets that I find myself using repeatedly.First off is some numeric pagination using native...
01 Oct 2013

How to Use Bitbucket with Github for Mac

I like BitBucket – all the cool kids use Github, but for small businesses BitBucket is great. Why? Because it has free private repositories for teams of 5 or smaller. And that’s me right there.Currently I am using BitBucket for...
26 Sep 2018

WordPress get_post_gallery() Gutenberg Polyfill

I’m working on a new WordPress theme designed for Gutenberg, however Gutenberg isn’t finished, and there are elements that won’t work until the plugin is merged with core.One such issue, that I ran into this weekend, is that get_post_gallery() doesn’t...
13 Jul 2009

Fussing over the (web design) details

Having spent the last couple of months (on and off) messing around with the new Binary Moon design I am now at the stage where I want to say it’s finished and move on to something else.There’s a well known...