I used bitbucket a lot in the past (mostly because of the private repos). Have not used it for a while and now I always get "fatal: Authentication failed" error when trying to clone a repo. I feel it may be related to this whole Atlassian thing because now I cannot find how to configure bitbucket user password, only Atlassian password. That's why I am asking: is there some other bitbucket user password and is there any way to change it?
All I see after clicking in the upper right corner when logged in bitbucket is "Manage Atlassian account, View profile, Bitbucket settings, Integrations, Log ot". Password changing is only located in "Manage Atlassian account".
This what I've done so far (without success):
changed password (several times, now it consists of the small letters only)
played with variations of URL (with/out username, adding password to url)
deleted bitbucket account and created a new one (however, connected to the same Atlassian account as before)
tested via different networks at home/work.
Nothing worked so far. The same result on different computers (Windows and Linux). In the same time I can clone Github repos and work with them as usual. I need HTTPS only.
You likely need to configure your SSH keys properly. Login to Bitbucket through the web browser. Click on your icon in the top right corner and click on Bitbucket Settings from the pop-up menu. On the next screen will be a Settings menu on the left hand side. Click on SSH keys. If you already have SSH keys setup on your computer you can add your current keys. If you don't you'll need to create some keys, usually done with the ssh-keygen command line tool. This should generate two files, id_rsa and id_rsa.pub. Open the id_rsa.pub file and copy the contents to your clip board. Back in your web browser click the Add Key button. Give it a label and paste the contents of your clipboard into the Key text box.
You'll need to make sure git is set to use this key when you connect either through an SSH config file.
Everything works after creating a brand new user for both Bitbucket and Atlassian with another email.
Related
Recently our web hoster (Domainfactory) changed the method to externally access our online mysql database. From simple ssh "port forwarding" to a "unix socks tunnel".
The ssh call looks like this (and it works!):
ssh -N -L 5001:/var/lib/mysql5/mysql5.sock ssh-user#ourdomain.tld
The problem: you have to enter the password every single time.
In the past I used BitVise SSH client to create a profile (which also stores the encrypted password). By simply double-clicking on the profile you'll be automatically logged in.
Unfortunately, neither the "BitVise SSH client" nor "Putty" (plink.exe) supports the "Unix socks tunnel" feature/extension, so I can't use these tools any more.
Does anyone have an idea how to realize an automated login (script, tool, whatever)?.
The employees who access the database must not know the SSH password in any case!
I got a solution. The trick is to generate a SSH Key pair (private and public) on client side (Windows machine) calling 'ssh-keygen'. Important: don't secure the ssh keys with a password (simply press [enter] if you're asked for a password, otherwise you'll be asked for the SSH-Key password every time you try to SSH). Two files will be generated inside 'c:\Users\your_user\.shh\': 'id_rsa' (private key) and 'id_rsa.pub ' (public key).
On server side create a '.shh' directory within your user's home directory. Inside the '.ssh' directory create a simple text file called 'authorized_keys'. Copy the contents of 'id_rsa.pub' into this file (unfortunately 'ssh-copy-id' isn't available yet for Windows. So you have to do the copy and paste stuff on your own.) Set permissions of 'authorized_keys' file to '600'.
Now you should be able to simply SSH into your server by calling 'ssh-user#ourdomain.tld' without entering a password. Create a batch file with your individual ssh-call and you're done.
Thanks to Scott Hanselman for his tutorial: https://www.hanselman.com/blog/how-to-use-windows-10s-builtin-openssh-to-automatically-ssh-into-a-remote-linux-machine
I have Tortoisehg set up with a clone of a remote repository on Bitbucket, using https protocol. I turned on the mercurial_keyring extension, and it took care of password handling just fine. Until one day it didn't. Every time I commit now, on push-after-commit it pops up and asks me for a password.
I carefully changed the password on the server, and started typing in that password when asked. IT DOESN'T HELP! It doesn't accept that password.
I hit cancel when asked for the password. Then I go and press the Push green arrow button at the top right of the screen. After asking for confirmation – IT GOES! No password required!
There are three computers that connect to this particular Bitbucket repository. For a while two of the three were working fine without asking a password. Then another one started asking! And then a third popped up asking for something different: "You need to identify yourself to the server." Once again, cancel, use the Push button, works fine!
I am so confused. Has anyone seen this, has anyone fixed it?
BTW, the remote repository is nowhere mentioned in my tortoisehg settings, but it is in my hgrc file:
[paths]
default = https://joymaker3#bitbucket.org/joymaker3/my-repo-name
I yjink, you have to re-read at least section 3.2. "Repository configuration (HTTP)" of extension wiki and check related settings of all repos:
good (full) URL in [paths]
only needed data (if needed) in [auth] (no password for configured remote repository)
you can also enable debug in TortoiseHG and inspect output on failed push
We use Vagrant boxes for development. For every project or small snippet we simply start a new box and provision it with Ansible. This is working fantastic; however, we do get into trouble when connecting to a private Bitbucket repository within a bower install run.
The solution we have now is to generate a new key (ssh-keygen), accept all defaults (pressing <return>, <return>, <return>) and then grab the public key (cat ~/.ssh/id_rsa.pub). Copy it, go to Bitbucket, view your account and add this new ssh key. And repeat for every new box you instantiate.
We have to do this because of some closed source packages (hosted on Bitbucket) we install via Bower. We do have another experience, which is much better: composer (php's package manager) and private Github repositories. With that setup, you have to enter your username/password/2fa token via the command line and an OAuth token is generated for you. This works great.
So, is there a way we can mitigate this bower/bitbucket/ssh issue? For obvious reasons I don't want to provision the boxes with a standard private key, but there has to be another solution?
While I'm not sure that my situation is as complex as yours (I'm not using Ansible or Bower), I solved this problem by using the Vagrant ssh forward agent. This blog post gives you the details on how to get it working:
Cloning from GitHub in Vagrant using SSH agent forwarding
So as long as each of the developers has access on their local machines to the bitbucket repos, it should work.
I have repository on both github.com and bitbucket.org, and I am very familiar using Git Extensions for all repository functions... But when I started using bitbucket.org repositories I have to use TortoiseHg SVN for it ... so I want to ask that is there a way I can use Git Extensions for Bitbucket repositories?
I haven't fully tested it, but these steps allowed me to clone a Bitbucket repository in Git Extensions.
You can use PuTTY to generate a public/private SSH key, then add that key to Bitbucket.
Run GitExtensions\PuTTY\puttygen.exe
Click Generate
Click Save public key (as a text file)
Click Save private key (as a ppk file)
Run GitExtensions\PuTTY\pageant.exe C:\path\to\ppk-file.ppk
Log into Bitbucket
Go into Account settings (Settings → Security → SSH keys*)
Paste your public key into the SSH keys text input as (spaces are important, do not include square brackets around the public key):
ssh-rsa [AA-YOUR-PUBLIC-KEY-ALL-ONE-LINE-SPACES-REMOVED-==] youremail#domain.example
Click Add key
In Git Extensions, click Clone repository
Use the SSH repository link on Bitbucket as the repository to clone
Click Load SSH key
Browse to and load the ppk file
Click Clone
I found that most of this worked for me with just a few small changes.
Run GitExtensions\PuTTY\puttygen.exe
Click Generate
Click Save public key (as a text file)
Click Save private key (as a ppk file)
Didn't have to run this step --Run GitExtensions\PuTTY\pageant.exe C:\path\to\ppk-file.ppk--
Log into bitbucket
Go into Account settings
Paste your public key into the SSH keys text input as (spaces are important but with no email address on the end): ssh-rsa [AA-YOUR-PUBLIC-KEY-ALL-ONE-LINE-SPACES-REMOVED-==]
Click Add key
In Git Extensions, click Clone repository
Use the SSH repository link on bitbucket as the Repository to clone ( i.e. git#bitbucket.org:yourname/repo.git)
Click Load SSH key
Browse to and load the ppk file
Click Clone
Also I found that I was having a problem saying that the machine I was looking for might not be the correct one. I found this very helpful and if you are having problems might be useful Using the SSH protocol with Bitbucket and very quickly helped me through that.
It's been 10 years since the original answer was posted, and I can now get this working without using SSH:
Log into Bitbucket, click on your avatar, and go to "Personal settings".
Go to "App passwords", and click the "Create app password" button.
Create a password for Git Extensions. When selecting permissions, choose "Read" and "Write" under "Repositories". You will be shown the password only once - make a note of it.
Clone the repo in Git Extensions, using the HTTPS link from Bitbucket.
When prompted to log in, keep the default user name (don't change it to your email address), and enter the app password.
A web page will open for you to authorize Git Credential Manager to access your Bitbucket account.
Once authorized, Git Extensions should start downloading the repo.
I have tortoiseSVN set up on my local windows 7 computer. I access the repository with a password. For example, if I right-click on a file from within Windows Explorer, and then select 'repo-browser', the password dialogue box pops up.
I now would like to modify my setup to use key authentication, rather than passwords. I followed the instructions here: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-ssh-create-keys.html
Everything worked fine until I got to this step:
Testing SSH with TortoiseSVN: ... Right click on any folder in Windows
Explorer and select TortoiseSVN →
Repo-Browser. You will be prompted to
enter a URL, so enter one in this
form:
svn+ssh://svnuser#SvnConnection/repos
When I select Repo-Browser, the password dialogue pops up immediately. I am not prompted to enter a URL. If I try canceling the password dialogue, the password dialogue just pops up again.
How do I get the password dialogue to stop popping up? How do I "tell" TortoiseSVN that I want to use key authentication rather than passwords?
The password dialog probably pops up because TorToiseSVN fails to find any ssh key.
On Windows, this is usually due to the environment variable HOME being not defined by default. (HOMEDIR is, HOME is not).
You can set HOME to any directory of your choice, it needs to contain a .ssh directory with your public/private key in it.
Then, make sure that basic SSH communication works first, before fiddling with the TortoiseSVN client itself.