Local Development in Bitbucket With App Password
No SSH Required
On March 1st (although this didn’t affect me until March 10th…), Bitbucket stopped allowing users to push/pull code using the basic auth they use to login to bitbucket.com (see announcement). I guess the idea being that its a security vulnerability — the same creds used to manage your BitBucket account shouldn’t have the same scopes as the ones used to write code.
In any case, this immediately hosed my local IntelliJ environment and some of my personal Jenkins builds, which also were using the passwords (terrible, I know). In IntelliJ, when I tried to push code it failed and gave me this prompt.
But my normal password stopped working. I first tried to reset my BitBucket account to no avail. The new password didn’t solve the issue.
At this point, I had to either setup SSH keys or use App Passwords. SSH keys are kind of annoying because my IDE was already setup to use username/password, and I hate mucking with Windows Git Bash … inevitably it always screws something up. So instead I setup an app password.
In Bitbucket click on your avatar then Personal Settings -> App Passwords. Click “Create app password” and give it a name like “Local IDE” and give it the following permissions. I may also have given Account -> Write, but TBH don’t know what it does.
This will generate a one-time password, which you need to save. Put that password into the Atlassian login prompt above and voila, your IDE should work again.