youngmon/atlassian-qna huggingface dataset:
Need to add ssh key to my profile but its added as an access key
Asked by Douglas Chifetete:

Hello

I want to add this ssh key to my bitbucket repo. I am sadly getting an error that it's already added as an access key elsewhere. How can I figure out where I have added the SSH key?


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

This happens when you try to use the same key for two different accounts. You should not be doing this, a key should belong to a single (user) account.

There's no easy way to find out which of your other accounts may have already uploaded the key, and hence no way to remove it.

The solution, assuming you don't want to use the older account, or can't find out where it is, is to generate a new key for the newer account and add that instead.


Tags: bitbucket-cloud

cloud
Enable pipeline Feature in Bitbucket DC
Asked by mohammed aamer khan:

Hi There,  
I am a Bitbucket DC user with very old version i.e. v4.12.0. I wants to know if pipeline feature is available in this version and if it is available then how to enable it.  

Thanks


Answers:
author: mohammed aamer khan
body: Hi There,  
Pipeline feature is not available in Bitbucket 4.12.0  

Thanks


Tags: bitbucket-server

server
Environment via variable input with custom pipeline
Asked by Michiel Jakobs:

Hi Everybody,

With a custom pipeline I want to be able to pass the environment as user input. How can I solve this?

I now have this, but it gives me an error message.

![bitbucket-pipelines-custom.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/198061i685E7BF176EFC6CF/image-size/large?v=v2&px=999 "bitbucket-pipelines-custom.jpg")

Thanks


Answers:
author: Theodora Boudale
body: Hi [@Michiel Jakobs](/t5/user/viewprofilepage/user-id/144979),

I'm afraid that this is not possible at the moment.

We have a feature request about this in our issue tracker:

* <https://jira.atlassian.com/browse/BCLOUD-19611>

I would suggest adding your vote to that ticket (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

In the meantime, the way to work around this would be by creating a separate custom pipeline for each deployment environment.

Kind regards,  
Theodora

comments: author: Michiel Jakobs
body: Hi Theodora,

Thanks for your comment. I have given my vote.

With your alternative, we notice a different problem in automation.  
I notice that when modifying the yml file with php the anchors are no longer used - making the yml a large file with the same codes.

Is there maybe a solution for that?


author: Theodora Boudale
body: Hi Michiel,

I'm not sure what you mean that the anchors are no longer used.

Would it be possible to post the following so I can better help you?

* the bitbucket-pipelines.yml file that doesn't work as expected (no need to post the exact commands, I just need to see the structure)
* what is the exact behavior that you see

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Publickey stopped working on one repository
Asked by David Hough:

This evening I pushed some commits to a repo using SourceTree, which worked just fine. A short time later, I tried pushing some more and suddenly the publickey decided not to work, asking for a password and then telling me that passwords were now disabled. If I check with ssh -T, it assures me that the key is just fine, and if I try pushing something to another repo, that works also, so it's nothing to do with the key itself. I tried restarting SourceTree, which prompted for my master key as expected, but it still refused to push to the repo. I tried the WSL command line and that also failed. I tried TortoiseGit and that failed, but again, just for the one repository.

I was helping one of my colleagues a few days ago who had a similar problem, and it mysteriously started working again for him after a while, but I've not been lucky with that yet.

I just tried a pull from the repository and it won't let me do that either, but once again, other repos are just fine.

I can view the repository and its files on the web just fine.

Edit to add: it's some sort of local repository corruption. I was able to clone the repository to a new directory OK, copy the modified files from the previous one, commit and push.


Answers:
author: David Hough
body: I seem to have figured out a solution, even though I don't know why it broke, but in case it helps someone else, this is what appears to have happened:

Go look at the git config (.git/config) file and under remote origin, it will have

**url = https://....
fetch = +refs/heads/\*:refs/remotes/origin/\***

and no mention of an ssh key.

What you need there is

**url = git@bitbucket.org:...
fetch = +refs/heads/\*:refs/remotes/origin/\*
puttykeyfile = ...**

The quickest way to fix it seems to be to clone the repository to somewhere else and copy over the config file from the new one to the old one, or at least copy the remote section.

Another variation reported by a colleague appears to be where the url is correct but the line defining the key file is missing.


Tags: bitbucket-cloud

cloud
How to debug 500 error when attempting to create a commit by uploading a file
Asked by Brandon Clark:

I am making a simple application/x-www-form-urlencoded POST request to:

<https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/src>

This is working for 2 of my repos but not for the third and I am stuck! The API always responds with an http code of 500 and "Something went wrong". I've tried tweaking everything I can think of and nothing works. Ideas?

Response:  
{  
"type": "error",  
"error": {  
"message": "Something went wrong",  
"id": "43981057f56b4d46a2b12c9bfd4b293d"  
}  
}


Answers:
author: Ben
body: G'day Brandon!

I have raised a support ticket on your behalf, as investigating this issue further will require sharing potentially personal information which would not be fit to share on a public post.

Please follow the link to the support portal which has been sent to your registered email address.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Github login, Not able to login anymore, repos are removed.
Asked by HarryRotter:

So here is my problem.

I registered on BitBucket like two years ago through GitHub as

a registration method. Now I can?t login to my account, anymore. (They removed GitHub social login). I typed in the email address which I am using with my GitHub account.

I did resetting my password a dozen of times. But all the time, the organisation and

the repositories, I was invited in, are gone. Did someone else have already had

this kind of problem? And how did you solve it?


Answers:
author: Ben
body: G'day Harry!

Welcome to the Bitbucket Cloud Community :)

I have raised a support ticket on your behalf as this will need to be something that we take a look into internally, please check your registered email address for a link to the support portal.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
run bitbucket pipeline with python
Asked by AXA:

I am trying to run my bitbucket pipeline \`\`\`branches/main\`\`\` with this script. Currently, when I run it, I see no output. No error/success message. When I check on bitbucket, the pipeline has not run. How can I further debug this?  
\`\`\`  
import requests  
headers = {  
'Content-type': 'application/json',  
}

data = """  
{"target": {  
"ref_type": "branch",  
"type": "pipeline_ref_target",  
"ref_name": "main",  
"selector": {  
"type": "branches",  
"pattern" : "main"  
}  
},  
"variables": \[  
{  
"key" : "build_number",  
"value" : "3"  
},  
{  
"key" : "workspace",  
"value" : "My Name"  
}\]  
}  
"""

response = requests.post('<https://api.bitbucket.org/2.0/repositories/workspaceidmyname/{f567890098765456789234560}/pipelines/>', headers=headers, data=data, auth=(username, password))  
print(response.text)  
\`\`\`

Am I using the wrong selector or name? This is how my \`\`\`bitbucket-pipelines.yml\`\`\`file looks like:  
\`\`\`  
image: atlassian/default-image:3

pipelines:  
default:  
- step:  
name: 'default'  
script:  
- echo "Your security scan goes here..."  
branches:  
main:  
- step:  
name: 'Validate'  
script:  
- echo "main branch's pipeline"  
\`\`\`

For the authentication, I used an "app password".


Answers:
author: Theodora Boudale
body: Hi [@Azmah Aaban](/t5/user/viewprofilepage/user-id/4933571),

You don't need to use a selector, since there is a definition for the branch **main** in your bitbucket-pipelines.yml file. If you run this call with target main, the pipeline for the main branch will run.

The **"variables"** part in the data is to be used only with custom pipelines that have variables defined in the bitbucket-pipelines.yml file.

Can you try running the call with the following data?

```
{
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "main"
}
}
```

I'm not very familiar with Python so I'm not sure if the rest of the details are correct, but an example with curl which should work is the following:

```

curl -X POST -is -u BitbucketUsername:AppPassword \
-H 'Content-Type: application/json' \
https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/pipelines/ \
-d '
{
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "main"
}
}'
```

The values in bold are the ones that need to be replaced with the respective ones for your account, workspace, and repo.

Kind regards,  
Theodora


Tags: atl-pipelines

bitbucket-cloud

bitbucket-pipelines

cloud

git

python
Bitbucket cloud Webhook won't trigger rancher pipeline
Asked by Dmitry Portnoy:

Integrated Bitbucket Cloud with Rancher. I able to see repositories, created rancher pipeline, but it won't trigger automatically if some changes have been made in repo.  
Getting error:

X-Squid-Error ERR_CONNECT_FAIL 110  
As per BitBucket support solution, added following IPs to rancher security group and to route tables using internet gateway.

IPv4 inbound for bitbucket.org, api.bitbucket.org, and altssh.bitbucket.org 104.192.136.0/21 185.166.140.0/22 18.205.93.0/25 18.234.32.128/25 13.52.5.0/25

Still doesn't work....... Please, help. Thank you


Answers:
author: Theodora Boudale
body: Hi [@Dmitry Portnoy](/t5/user/viewprofilepage/user-id/4857238) and welcome to the community.

The IP addresses that need to be whitelisted for webhook delivery are different.

On [this documentation page](https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/) there is a section titled "**Valid IP addresses for webhook delivery**" that has a link to the following page:

* <https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/#Outgoing-Connections>

You will need to whitelist these IPs for **Outgoing Connections**.

Kind regards,  
Theodora

comments: author: Dmitry Portnoy
body: Thank you! It works!!


author: Theodora Boudale
body: That's good to hear and you are very welcome!

Please feel free to reach out if you ever need anything else.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Automatic synchronisation local repository with remote
Asked by Eva Koenders:

Hi everyone,

I'm trying to figure out how to automatically push changes made in the main branche of my remote repository on bitbucket to my local repository. The local version gets executed every night through scheduling and I want it to be up to date with remote main before it executes. Does anyone know how to set this up?

Regards,

Eva


Answers:
author: Mikael Sandberg
body: You would have to set something up locally that pulls from the remote repository. Git does not keep track of each clone, so you would not be able to do something like that from the remote repository.


Tags: automation

remote

sync
Licensing/setup for Sourcetree in a computer lab?
Asked by Zach Heise:

Dear Atlassian or other Sourcetree experts,

I'm a computer lab administrator for a school. One of our teachers wants me to get Sourcetree on 60 machines in a computer lab I manage. I've been doing some reading online and it seems that sometime in the past couple years, Atlassian has changed the licensing from a code you put in, to an account you sign into. Well...okay. I don't mind having "my" account signed in on 60 machines - but I do need to find a way to clone this licensing from the Administrator account on Windows, to all the other accounts that will be signing in on this machine once I capture its image and distribute it to 60 other machines.  

Is this possible anymore, or no? Is there any way to pay Atlassian for a proper, multi-user license key like...um...every other piece of normal software out there? Because this is really a pain in the rump for administrative academic setup.


Answers:
author: Zach Heise
body: Our security guy doesn't want me to install an old version of the software either. He's right, of course - it's bad practice to try to evade a program's newly-added bad behavior by hiding behind old updates.

Our only other option is just to...not use Sourcetree. I don't want to have to tell a professor that, though...


author: Thomas Pemberton
body: I am in the exact same situation. Any kind of install without the login requirement or some other (automated) solution to license on a bunch of computers?
which necessary files do I need to push for an ADF project?
Asked by HK:

I am working on an ADF project. Now when I modify the entity file in JDeveloper, then which necessary files do I need to push into GIT repository.

Background issue:

After I modify the entity file of ADF, I only push XML file into GIT repository. Later after I pull the whole project from GIT repository into a NEW local repository, but I could not open the project in the JDeveloper tool.


Answers:
author: Seth
body: I don't think typical sourcetree users (myself included) have any idea what an AF project is. If your question was "How do I push certain files with SourceTree?", you'd be in the right place. The question as written should be in an ADF forum of some kind.
SourceTree wants a SSH key EVERY time I start it
Asked by Hertzole:

Hello

So I've got a pretty annoying problem with SourceTree. Every time I start it, it forgets the SSH keys I've added to the pageant key list. I ALWAYS have to add it. This is getting really annoying. Why does this happen and is there a fix for it?


Answers:
author: Dean Valentine
body: Hi,

Are you using pageant for anything else? Is it losing any other keys for any other apps?

Looks like you're not the only one with this problem either:

<https://answers.atlassian.com/questions/175190>

comments: author: Hertzole
body: No, I'm not using it for anything else, only SourceTree.


Tags: ssh-key
How to stage files easily with 1.9.6.1
Asked by shardvarks:

I recently upgraded to 1.9.6.1. And it doesn't seem like there is a simple way to stage files.

I used to be able to drag files from unstage to stage. OR I could click on the check box next to the file.

I can no longer do either. It seems like the only thing I can do is click the buttons "stage all" or "stage selected"

This means I now have to select the file then click the "stage selected" button. Or selected multiple using ctrl-click then "stage selected" But both of these mechanisms require more clicks (and thus more work) than before. This seems to be a step backwards.


Answers:
author: Rodney
body: I use the space bar to quickly stage files.

Use Ctrl-click to multi-select then instead of clicking Stage Selected, just hit space bar.
Source tree has stopped working in windows 8.1
Asked by Tasleem Arif:

Hi Support i have fresh installation of windows 8.1,i have downloaded SourceTreeSetup_1.9.6.1, after successful installation when i run as administrator it fails on 1.png  
when i click on use an existing Account it fails, and show this screen with message  
2.png on debugging its shows below screen with message  
3.png Can anybody help me what i am missing i have disabled Node32 as well, i am able to login to Atlassian site as well but here i am not taking to login screen exception is thrown prior to that  
[](https://community.atlassian.com/t5/Sourcetree-questions/Source-tree-has-stopped-working-in-windows-8-1/qaq-p/136267?attachment-id=1535){#link_1168e634ef239f}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4047/1/3.png){#display_1168e634ef239f_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Source-tree-has-stopped-working-in-windows-8-1/qaq-p/136267?attachment-id=1536){#link_1168e634ef239f_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4047/2/1.png){#display_1168e634ef239f_2}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Source-tree-has-stopped-working-in-windows-8-1/qaq-p/136267?attachment-id=1537){#link_1168e634ef239f_1}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4047/3/2.png){#display_1168e634ef239f_4}


Answers:
author: Rajeev Agile Ravishankar
body: I am facing the same issue.

Where you able to resolve this?


author: zhaopf
body: Hello, this problem is solved, I now face the same problem.

comments: author: Tasleem Arif
body: Hi i did this  
1- Setup on windows 7 it works well, copy files from local folder in appData into windows 8 AppData for Source Tree, it worked, then i uninstalled \& after install it worked well
Update git flow version bundled into sourcetree installer
Asked by lucascebertin:

A few days ago I was looking for --no-ff in sourcetree, I found it in Tools \> Options \> GIT \> do not fast-forward ...

But I'm a git flow user and this option do not reflect into the script execution, after digging a little bit more on the main repository (<https://github.com/nvie/gitflow>) I realized that this is completely dead, the last commit was in 2012...

There is another options out there and I found this one: <https://github.com/petervanderdoes/gitflow-avh>  
Can you guys consider to upgrade the bundled sourcetree git flow version?  
Can I upgrade it manually or will I have any undesirable behaviour?

I'm a huge fan of sourcetree and git flow but outdated things just freaks me out...  

Thanks.


Answers:
author: Seth
body: Vote up these feature requests:

<https://jira.atlassian.com/browse/SRCTREEWIN-1394>

<https://jira.atlassian.com/browse/SRCTREE-1762>

comments: author: lucascebertin
body: Done!


Tags: git-flow
Start Pageant Using Private Key File with No Extension
Asked by Shawn Quillman:

I'm using SourceTree 1.9.6.1 on Windows 7 Enterprise SP1.

I have a private key file that I generated with PuttyGen and saved to a file with no file extension. I can load the file fine from Pageant and SSH functions in SourceTree work fine after doing so.

I have configured the SSH Key option in SourceTree with the path to my PK file.

image2016-8-18 16:19:11.png

However, the key is not loaded into Pageant when SourceTree launches Pageant during startup. I am also prompted to load the key file if Pageant is not running and I use the Launch SSH Agent... function from the Tools menu. If I say Yes and browse to the file, the SSH Key option is automatically configured with the correct path to the extensionless file, as I would expect.

If I add the .ppk extension to the file everything works as expected. Pageant is launched during SourceTree startup and my key file is loaded by Pageant. Also, launching Pageant from the command line with the path to the extensionless file works fine.

This is clearly not high priority issue, rather a minor annoyance, but I thought I would submit something on it anyway.

**Edit:**

Bug reported: <https://jira.atlassian.com/browse/SRCTREEWIN-6187>  
[](https://community.atlassian.com/t5/Sourcetree-questions/Start-Pageant-Using-Private-Key-File-with-No-Extension/qaq-p/140743?attachment-id=3137){#link_1168e659f24e46}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4162/1/image2016-8-18%2016%3A19%3A11.png){#display_1168e659f24e46_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Start-Pageant-Using-Private-Key-File-with-No-Extension/qaq-p/140743?attachment-id=3138){#link_1168e659f24e46_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4162/2/image2016-8-18%2016%3A18%3A41.png){#display_1168e659f24e46_2}


Answers:
author: Seth
body: Have you tried launching pageant from the command line using a parameter to have it immediately load the key? This is probably what SourceTree does behind the scenes, and if pageant doesn't load the key when specified on the command line, it's a pageant issue, not a SourceTree one.

However, if that works fine, you should submit a bug report to jira.atlassian.com.

If you want to quit relying on SourceTree to launch Pageant, you can follow these steps to get Pageant to launch with your key: <http://blog.shvetsov.com/2010/03/making-pageant-automatically-load-keys.html>

comments: author: Shawn Quillman
body: Yes, mentioned the command line launch in the post. I guess I should have looked deeper into submitting bug reports! I'll do that. Thanks!