The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,990 other followers

Archive for the ‘BitBucket’ Category

Bitbucket – when you suddenly cannot login with git username/password from git any more

Posted by jpluimers on 2017/05/16

When logging in using the Web UI with a username

When logging in using the Web UI with a username

As of a few days, I was getting this error in my SourceTree output when pushing to git :

remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.

I think this is at least related to a change Bitbucket made 2 years ago for their site logon:

You can no longer log in with a username. Use your Atlassian account email address instead.

Source: Bitbucket

Pushing to bitbucket with cached credentials from SourceTree has worked for months. One thing that was different now (and should have given me a clue) the broken [WayBack] broken Git Credentials Manager popup showed but should not have.

When you get this credential manager you have to escape it as otherwise you will get an “Empty password” error.

Broken Git Credential Manager for Windows

Broken Git Credential Manager for Windows

Initially I blamed the error on the SourceTree 2.x upgrade I did last week. Unlike previous upgrades, this one had kept the old version (in my case 1.9.13.7) around and after a few clicks (skipping the “go to download page” prompt forever) and closing SourceTree 2.0, I fas able to start SourceTree 1.9 again.

SourceTree 1.9 had the same problem which meant it was either git itself, or the Bitbucket back-end.

To prove it was the Bitbucket back-end, I did everything An example of this is in the output below.

Solving the problem

What helped were these steps:

  1. Change the git repository from https://jeroenp@bitbucket.org/jeroenp/fastmm.git to
    https://bitbucket.org/jeroenp/fastmm.git
  2. Change the “username” field for the bitbucket repository to be my email address.
  3. Remove any bitbucket cached credentials from SourceTree.
  4. Restart SourceTree.
  5. Performing a push
  6. Cancel the Git Credential Manager popup
  7. Use my primary bitbucket email address for logon

Now SourceTree happily cached my credentials.

I’ve used this to scan the git config files for ones starting with a username:

grep -inSwl jeroenp@bitbucket config

Notes:

From the console

Reproduction of the issue:

C:\Users\jeroenp\Versioned\FastMM>git --version
git version 2.12.2.windows.1

C:\Users\jeroenp\Versioned\FastMM>git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream bitbucket develop:develop
Pushing to https://jeroenp@bitbucket.org/jeroenp/fastmm.git
Logon failed, use ctrl+c to cancel basic credential prompt.
Password for 'https://jeroenp@bitbucket.org/':
remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.
fatal: Authentication failed for 'https://jeroenp@bitbucket.org/jeroenp/fastmm.git/'

This has worked for months (after [WayBack] canceling the Git Credentials Manager popup as that has been broken for a very long time and gives you a remote: Empty password).

What helped was this:

C:\Users\jeroenp\Versioned\FastMM>git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream bitbucket develop:develop
Pushing to https://bitbucket.org/jeroenp/fastmm.git
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for 'https://bitbucket.org/': jeroen...@....com
Password for 'https://jeroen...@....comcom@bitbucket.org/':
Total 0 (delta 0), reused 0 (delta 0)
POST git-receive-pack (196 bytes)
remote:
remote: Create pull request for develop:
remote:   https://bitbucket.org/jeroenp/fastmm/pull-requests/new?source=develop&t=1
remote:
To https://bitbucket.org/jeroenp/fastmm.git
   xxxxxxxx..xxxxxxxx  develop -> develop
updating local tracking ref 'refs/remotes/bitbucket/develop'
Branch develop set up to track remote branch develop from bitbucket.

–jeroen

 

 

Posted in BitBucket, Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Research list: export issues from Bitbucket to import them later

Posted by jpluimers on 2017/05/10

This has been bugging me for a while: some Bitbucket repositories are abandoned but have a useful list of issues.

When forking them, you don’t get the issues and you cannot export them either (because the source repository is not yours).

Some links that might help me get started to solve this:

Being able to import from a non-exportable repository would allow me to keep issue # references in sync which would make it a lot easier for relating commit history with issues.

–jeroen

Posted in BitBucket, Development, Source Code Management | Leave a Comment »

raw.githack.com – like rawgit.com but supports bitbucket as well and runs on plain nginx

Posted by jpluimers on 2017/03/07

Found out recently that next to rawgit.com there is also raw.githack.com which contrary to the name also supports bitbucket files:

–jeroen

Posted in BitBucket, Development, DVCS - Distributed Version Control, git, githack.com, GitHub, Mercurial/Hg, rawgit, Source Code Management | Leave a Comment »

Linking commits to issues and issues to issues on BitBucket (via: Resolve issues automatically when users push code – Bitbucket – Atlassian Documentation)

Posted by jpluimers on 2015/08/13

Besides commit statements from hg or git like this:

hg commit -m “fixes #6, resolve ticket #5 and see ticket #9 and ticket #5 in the tracker”

The best is to start with the command, then finish the comment (commands in the middle of a comment are far less reliable).

There is a whole bunch of commands for which BitBucket tries to understand conjugations of verbs:

Command “Verb” Conjugation(s)
resolve close close
closes
closed
closing
resolve fix
fix
fixed
fixes
fixing
resolve resolve resolve
resolves
resolved
resolving
reopen reopen reopen
reopens
reopening
hold hold hold
holds
holding
wontfix wontfix wontfix
invalid invaldate invalidate
invalidates
invalidated
invalidating

You can also use the word “issue” in the middle to just link to an issue like this syntax:

links to issue #1

Finally, you can refer from issues to change sets using a cset syntax: <<cset 2f2f8d4cae7da0e37a5ffbc81c527cb67cc56015>> where the hex number is from a URL in your commit list (for instance in https://bitbucket.org/jeroenp/fastmm/commits)

Note that linking from changesets to issues often automatically creates a back-link, but that doesn’t always work, and fixing it has very low priority (like many things on BitBucket): Issues getting linked to commits have the wrong link syntax, they show BB-6232 — Bitbucket.

–jeroen

via:

Posted in BitBucket, Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Source Code Management | Leave a Comment »

Moving my BitBucket mercurial repository to git was a lot harder than I hoped for (but moving to GitHub was easy)

Posted by jpluimers on 2015/06/10

After reading Converting Hg repositories to Git directed me into reading Bitbucket: Converting Hg repositories to Git I hoped moving my Mercurial repository on BitBucket to a Git repository would be something like following the steps.

It wasn’t.

First of all, hg-git on a Windows system requires Python or TortoiseHg. Neither of these I wanted to install for a one-off conversion.

So I took a throw-away Linux VM, and did the steps below. But let me first explain why.

Motivation

My motivation for moving away from BitBucket to GitHub, especially for projects containing markdown documentation.

When writing documentation in Markdown, being able to in-line reference pictures or have relative-references to other documents. This works perfectly in local Markdown tools (like MarkdownPad 2 or LightPaper).

Read the rest of this entry »

Posted in *nix, *nix-tools, BitBucket, Development, DVCS - Distributed Version Control, git, GitHub, Linux, Mercurial/Hg, openSuSE, Power User, Source Code Management, SuSE Linux | Leave a Comment »

 
%d bloggers like this: