youngmon/atlassian-qna huggingface dataset:
How to get Jenkins to connect to Bitbucket?
Asked by Mark Rossini:

How to get Jenkins to connect to Bitbucket?


Answers:
author: Syahrul
body: Hey [@Mark Rossini](/t5/user/viewprofilepage/user-id/4255532)

G'day.

We don't have KB for creating a connection With Jenkins since it's a 3rd party tool.

However, I do know an existing KB that can help you with creating a connection between Bitbucket and Jenkins, please check it out at:

* [Jenkins plugin for Bitbucket cloud](https://plugins.jenkins.io/bitbucket/)

Cheers,  
Syahrul

comments: author: Mark Rossini
body: Import existing code {#toc-hId--522228014}
------------------------------------------

[Create new repository](https://bitbucket.org/repo/create?workspace=mrossini2) {#toc-hId-1965284819}
----------------------------------------------------------------------------------------------------

Old repository {#toc-hId-157830356}
-----------------------------------

URL

New repository {#toc-hId--1649624107}
-------------------------------------

Workspace  

1.) How do we Import existing code? {#toc-hId-837888726}
--------------------------------------------------------

2.) What is Workspace?  
The original repository was set up by someone who no longer works here.


Tags: bitbucket-cloud

cloud
How I can access private bitbucket repository via bitbucket-pipeline?
Asked by Andrey Selemenev:

If I'm using nodejs version \> 12.14, then I'm receiving access error:
> + npm install eslint@8.25.0  
> npm ERR! code 128  
> npm ERR! An unknown git error occurred  
> npm ERR! command git --no-replace-objects ls-remote ssh://git@bitbucket.org/someprivatereponame/someprivatereponame.git  
> npm ERR! Warning: Permanently added the RSA host key for IP address 'X.X.X.X' to the list of known hosts.  
> npm ERR! [git@bitbucket.org](mailto:git@bitbucket.org): Permission denied (publickey).  
> npm ERR! fatal: Could not read from remote repository.  
> npm ERR!  
> npm ERR! Please make sure you have the correct access rights  
> npm ERR! and the repository exists.  
> npm ERR! A complete log of this run can be found in:  
> npm ERR! /root/.npm/_logs/2022-10-26T10_45_48_521Z-debug-0.log

`In packages json file package specified like:`  

```
"common-module": "bitbucket:`someprivatereponame`/common-module#v1.0"
```

where v1.0 is tag in git.

My pipeline file:  

```
image: node:18.11definitions:  steps:    - step: &lint        name: Lint application        caches:          - node        script:          - npm install eslint@8.25.0          - npm run lintclone:  depth: 1pipelines:  branches:    master: # or the name of your main branch      - step: *lint
```

So the question, what needs to be done to resolve this issue with private repo access? How and where I can provide ssh key?


Answers:
author: Andrey Selemenev
body: I found the issue, it was related to passphrase protected ssh key. So for bitbucket-pipelines we should use non-passphrased keys.


author: Mark C
body: Hi [@Andrey Selemenev](/t5/user/viewprofilepage/user-id/5063966),

Welcome to the community.

You can either generate or use your own SSH keys from your repository Pipelines **SSH keys** settings.

* Go to your repository
* Click **Repository settings**
* Click **SSH keys** (Under Pipelines)

Once you have set up the SSH key there, you can copy the public SSH key and either add it to your account's settings or the private repository [Access keys](https://support.atlassian.com/bitbucket-cloud/docs/add-access-keys/).

After that, you can run your Pipelines build again.

Let me know how it goes.

Regards,  
Mark C

comments: author: Andrey Selemenev
body: Let me try, but what's the difference, why for node v12 it's working fine, but for more new versions it's failing?


author: Andrey Selemenev
body: BTW, I have followed all your instructions, copy my public key from repo where I have pipeline running, added this key for private package which I need to access, but no luck. I still receiving the same error.


author: Mark C
body: Hi [@Andrey Selemenev](/t5/user/viewprofilepage/user-id/5063966)  

For your package.json file, could you try the below SSH URL connection?

```
"common-module": "ssh://bitbucket.org/workspace_id/repo_name.git"
```

<br />

If you're still getting the same error after that, I'm suspecting there's something causing it with the Node version \> 12.  

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Reset master to commit after pushing commits to the origin/master
Asked by NikolaLemmens:

![Screen Shot 2018-01-10 at 11.03.10.png](/t5/image/serverpage/image-id/12317i6F3EF19AFB63A91C/image-size/large?v=v2&px=999 "Screen Shot 2018-01-10 at 11.03.10.png")

Hi,

As you can see in the screenshot, my local master is 2 commits behind on the origin.

But I deliberately executed 'Reset master to this commit' and I want the origin/master to follow. So how can I continue with my local master and push to the origin?

When I make a commit on my local master I get this situation:

![Screen Shot 2018-01-10 at 11.14.49.png](/t5/image/serverpage/image-id/12319i287D648F2FDDB332/image-size/large?v=v2&px=999 "Screen Shot 2018-01-10 at 11.14.49.png")I obviously don't want to pull but I can't push neither (getting a message that I have to pull first).

If I pull I go back to the commits I didn't want. How can I go on from the 'Last Commit before Upgrading SIS' (locally and remote)?


Answers:
author: NikolaLemmens
body: Found an answer!

Check here:

<https://stackoverflow.com/questions/48203597/git-fatal-error-occurs-while-trying-to-reset-origin-master-to-commit?noredirect=1#comment83388775_48203597>


author: NikolaLemmens
body: Well,

After a lot of trying I'm back to my original situation(see screenshot one).

I tried to reverse the two commits 'sis commti' and 'SIS Clean up' but I'm only able to reverse one and then get the message:

![Screen Shot 2018-01-10 at 13.37.53.png](https://community.atlassian.com/t5/image/serverpage/image-id/12328i1D5BFDD40947C649/image-size/large?v=v2&px=999 "Screen Shot 2018-01-10 at 13.37.53.png")

How to solve this situation?

Cheers

Nikola

comments: author: NikolaLemmens
body: In the terminal I want to try the following:

```
git checkout master
git reset --hard e3f1e37
git push --force origin master
# Then to prove it (it won't print any diff)
git diff master..origin/master
```

But after

```
git checkout master
```

I get the following

```
fatal: Unable to create '~/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.?
```

Does this has anything to do with the Bitbucket storage layer incident?

Or what am I missing?
Unable to install SourceTree on Windows 10 version 2.4.7.0
Asked by Vikas Yadav:

I get stuck on log in to your Atlassian account.

None of the option, Use an existing account or Go to my Atlassian option works for me. The installer just gets stuck.

Any help?

I tried solution about adding a dummy account.json and passwd file, resetting my IE setting to low security setting but none of them helped.


Answers:
author: Ana Retamal
body: Hi Vikas! Have you updated Internet Explorer to the latest version? If that doesn't work, can you send us a screenshot of Sourcetree when it gets stuck so we can see what happens?

You can also have a look at the logs, you can find them at[Sourcetree logfile location](https://confluence.atlassian.com/sourcetreekb/sourcetree-logfile-location-675384748.html).

Let us know!

Ana
I'm having a major problem cloning any of my repositories due to Authentication issues
Asked by dcdereus:

I'm trying to do something really simple: clone a git repository from BitBucket using SourceTree. And have not been able to get it to work since last year.

It must have something to do with my acccount settins for dcdereus@bitbucket.org because my other account (which I created in desperation) works fine. Also cloning a Mercurial repo works fine.

I have the latest v of SourceTree, even reinstalled it. I figured I completely remove all credentials. But that also doesn't work. Cant delete then, edit them or set them as defaults. And they are not in my windows credential list.

![2018-01-09_21-29-29.png](/t5/image/serverpage/image-id/12263i2B9C60C46B41F756/image-size/large?v=v2&px=999 "2018-01-09_21-29-29.png")


Answers:
author: Ana Retamal
body: Hi! Have you tried [wiping Sourcetree preferences](https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html)?

Let us know if that helped.

Regards,

Ana
SourceTree install won't run on Windows 7 "Windows can't open this file"
Asked by Thomas Bithell:

I get this when trying to launch the downloaded install. I cannot find the appropriate program to launch. Shouldn't it just be and exe file that runs?

![SourceTree.PNG](/t5/image/serverpage/image-id/12255iD40666334C438F6E/image-size/large?v=v2&px=999 "SourceTree.PNG")


Answers:
author: Thomas Bithell
body: Make sure the downloaded SourceTreeSetup file has a file extension. Adding the .exe extension to the file fixed this problem.


author: Peter DeWitt
body: [@Thomas Bithell](/t5/user/viewprofilepage/user-id/378205), configure windows to show extensions and make sure that file shows an extention of .exe.

.pd

comments: author: Thomas Bithell
body: Interesting thing is Windows was already configured to show the extension of files. But the SourceTreeSetup file did not have an extension. I renamed the file and added .exe to the end and then it would launch and install.
Is there a way to skip pull/push dialogs?
Asked by madeinjapan:

I don't need or want the giant dialogs after pressing push/pull. How can I skip them?

When I press push or pull, I want it to push or pull straight away. There's absolutely positively nothing that I need to do in that dialog.

On top of that, the push/pull button is in the top button bar. And in the dialog, you need to move all the way to the bottom right to execute the push/pull. This is very nasty UX design.


Answers:
author: bgannin
body: There is not. Please file tickets at:

macOS: <https://jira.atlassian.com/browse/SRCTREE>

Windows: <https://jira.atlassian.com/browse/SRCTREEWIN>
SSH client: OpenSSH gives error
Asked by madeinjapan:

When I set the SSH Client to OpenSSH, I get this error:

```
'ssh-agent' failed with code -1: System.NullReferenceException: Object reference not set to an instance of an object.

?()
```

This message also appears every time I start SourceTree. As for the rest, everything appears to be working (as best as Atlassian can get it, I suppose).

Windows 10 FCU

SourceTree 2.4.7

Mercurial 4.4.2 (not embedded)

[OpenSSH](https://github.com/PowerShell/Win32-OpenSSH) 0.0.24 (same as the built-in windows feature, but with bugs fixed)


Answers:
author: Mike Corsaro
body: Hello! We ([and the Mercurial wiki](https://www.mercurial-scm.org/wiki/AccessingSshRepositoriesFromWindows)) recommend using putty/plink for SSH. Do you have a specific reason for using OpenSSH? Could you try putty/plink and see if you still get that error? Thanks!

comments: author: madeinjapan
body: Good integration into the terminal, identical syntax to linux' SSH command.

Also, OpenSSH is now a standard component of Windows 10 (albeit still in beta).

Let's put it differently. Why is the option for OpenSSH there if you recommend using putty? Don't you want OpenSSH to work too?


author: Mike Corsaro
body: OpenSSH actually won't work with Mercurial in Sourcetree, but it's up to you when using Git.


author: madeinjapan
body: Sounds like admitting the problem :)

Can you make sure it'll get fixed at some point?


Tags: windows
SSH key is mandatory or a repository can not require it?
Asked by alex75:

Hi,

I created a repository.

Trying to use SourceTree I have an issue abount "SSH key".  
I don't want a SSH key, I didn't set it.

In the "Settings / SS Keys" section of the repository it says:

"""You need to enable Pipelines for this repository to add SSH keys."""

This means the repository does not have SSH keys.  
I don't want to add them. OR is it mandatory?  
If it is mandatory why it is not asked when I created the repository?

Thanks,

Alessandro


Answers:
author: bgannin
body: Please post a screenshot of the issue you're encountering. I'm not clear on exactly what the problem is.


Tags: ssh-key
Add sourcetree login to trustworthy sites
Asked by Alexander Nie?:

Dear Support-Team,

I currently updated Sourcetree on a Win7 PC and i'm not able to login, the login process is stuck after entering the password. Are there any relevant URLs that i need to add to the Windows trustworthy sites? I added a few i found online and with them i am able to start the login process (beforehand it wasnt even possible to start the login process)

best regards

Alexander

Edit: changed Sourceforge to Sourcetree


Answers:
author: Ana Retamal
body: Hi Alexander! Sourceforge is not one of our products, so I'm wondering if you meant Sourcetree instead?

In the case of Sourcetree for Windows, it requires to have Internet Explorer updated to the latest version, as it relies on it for authentication. You might also need to do the following:

* Turn off compatibility mode in IE. To do that, open Internet Explorer, go to the *Advanced options* tab and click on *Reset your Internet Explorer Settings*
* Check *Delete personal settings*
* Change your Internet Explorer Security Zone Settings:

1. Open IE, click on the gear
2. Select "Internet Options"
3. Select the "Security" tab
4. Select "Custom Level" for Internet
5. Find "Access data sources across domains" and select "Enable" (make note of what the setting currently is)
6. Try logging into Sourcetree again

After logging in, follow steps 1-5, but ***reset the setting back to the previous option***.

If you're still having issues, let us know and send us a screenshot so we can continue helping you.

Regards!

Ana

comments: author: Alexander Nie?
body: Thanks for the reply, of course i meant Sourcetree, My current problem is that i'm not allowed to change the overall settings (locked by the domain group policy). So my only option is to add the respective sites necessary for login to my trustworthy sites.

Edit: After a few reboots and login approaches, Sourcetree immediately started with my account logged in. Even though not a single login approach worked.
Looking for latest offline installer
Asked by dane w:

I have two computers using SourceTree; one with internet access and one without. Based on the computer with internet access (that can self-update), the current (Windows) version of SourceTree is v2.4.7.0, however at the website (<https://www.sourcetreeapp.com/>), I can only find a downloader for v2.3.5.0. Is there a link somwhere to the latest v2.4.7.0 that I can use for the offline PC?

thanks!  
..dane


Answers:
author: Mikael Sandberg
body: The latest version of Sourcetree does not become available on the website until the staged rollout has reached 100%. Have a look at this blog post about it, <https://blog.sourcetreeapp.com/2016/11/16/adding-staged-updates-to-sourcetree/>


author: cardinal4
body: Atlassian's official stance is that SourceTree is not meant to, and cannot be, installed in an Offline Environment.

comments: author: Mikael Sandberg
body: There is actually a beta version out for offline installs via MSI installer, and you will be able to register by connecting to Bitbucket Cloud or Bitbucket Server instance instead of [my.atlassian.com](https://my.atlassian.com). Join the [Sourcetree Beta Program](https://groups.google.com/d/forum/atlassian-sourcetree-beta#) if you want test it out.


author: cardinal4
body: If I'm not wrong, Bitbucket Cloud is the hosted Bitbucket service on bitbucket.com. I don't see how registering with Bitbucket Cloud, is any different from registering with my.atlassian.com since both require an *internet connection* . The whole issue with an Offline Environment is that it's **offline**. An isolated intranet. No network connections in, nor out.


author: dane w
body: After some digging, I found this:  

<https://downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-2.4.7.0.exe>

Hope it helps someone!  
..dane

comments: author: Alex Bondarev
body: this does work either - in second step of the installation "login to your atlassian account" there 2 options - "use an existing account" and "go to my atlassian" - both fails without internet and there is no way to redirect to our bitbucket server
Is it legal to use screenshots and logo of Sourcetree in a non-commercial article?
Asked by HuaiYu Chao:

Hello, I'm a college student in Taiwan,

I'm now making a tutorial of Git, and for the sutdents who mostly use GUI instead of CLI, I decided to choose Sourcetree as the UI, this may make them easier to get start.

So I'm wondering is it legal to use screenshots and logo of Sourcetree? Of course I'll point out that the content of the app and the logo belong to Sourcetree(or Atlassian?), and attach the URL of Sourcetree.

And if so, can I publish the article/the other part of the article under CC licence?

Thanks for answering me and sorry for my poor English. QAO


Answers:
author: Ana Retamal
body: Hi HuaiYu, thanks for writing to us! You can totally use our logo and screenshots of our products, as far you comply with our terms:
>
> Our logos {#toc-hId-1767686431}
> -------------------------------
>
> Atlassian logos are distinctive graphic renditions. You may use the [Atlassian logo or product logos](https://www.atlassian.com/company/news/press-kit) in a blog or news article, publication, book or other online or offline medium, or on your website in reference to the respective Atlassian product, without our written consent, provided that the logos are duplicated exactly as shown in the preceding link, and the ? symbol (or the TM symbol, as applicable) attached to the shoulder of the logo as in the attached link is retained. All other usages of the Atlassian logos require the written approval of Atlassian.

You can find more information at [Atlassian Trademark](https://www.atlassian.com/legal/trademark). Let us know if you have any questions!

Have a good day :)

Ana

comments: author: HuaiYu Chao
body: Thanks so much! I've tried to find the legal page on Sourcetree's website, and it turns out to be on the official website of Atlassian. xD

I read the pages, but I didn't found the logo of Sourcetree. Can I just screenshot it from the official web and add a TM symbol?


author: Ana Retamal
body: You can take a screenshot, or you can also take it from [Logo files](https://atlassian.design/guidelines/marketing/resources/logo-files) (I'm going to report the missing logo in the first page, btw ;) )

Hope that helps!

Ana


author: HuaiYu Chao
body: It does help, thank you so much!


author: Ana Retamal
body: Glad to hear that, have a good day :)


author: HuaiYu Chao
body: Oh I'm sorry, I didn't know that I have to mark it as accepted answer.
SourceTree reset SSH key Mac
Asked by Wei Lin:

I use SourceTree + BitBucket combination with SSH setup on my Mac. It used to work fine.

Haven't used this Mac to code for a while. Today I tried to do fetch / push, all failed with this permission denied (public key) issue. I've done some research, tried the solutions in this article <https://confluence.atlassian.com/bitbucket/troubleshoot-ssh-issues-271943403.html>, but still stuck. Here're my steps:

* Confirmed my SSH key is still in BitBucket, also double checked the key strings are exact match
* Tried ssh-add -l: The agent has no identities
* Tried ssh-add */path/to/file:*file permission 0644 is too open, ignored
* Tried chmod 600 */path/to/file* , and then ssh-add */path/to/file*: ask for passphrase, which I forgot
* Opened Keychain Access, found the SSH key for this BitBucket account, show password, got it. Tried ssh-add */path/to/file* again with the password: keep saying it's Bad Passphrase...I don't understand why this happens.

So now I'm really stuck. I think it might be easier to just reset the SSH key in SourceTree, but couldn't find any references online regarding how to achieve that. Any suggestions?


Answers:
author: Wei Lin
body: Figured this out. It turns out I tried to ssh-add the .pub file. The correct file would be the one with the same name but without the .pub extension.


Tags: github

mac

ssh
My SourceTree installer is hanging on the log in screen and won't install
Asked by Blake Causey:

When I'm trying to install SourceTree and it asks for my login credentials it just spins. The popup window is normal where you can enter in the email and password and you can even hide or show the password but the blue login button has a spinner that just spins. Therefore, I can't get past this screen to get it installed.

I also reset my password a couple of times thinking maybe the app needing to be "kicked" and no luck. I can go into the portal and download a license but that's no good because I can't get it installed to even import the license.


Answers:
author: Ana Retamal
body: Hi Blake, are you on Windows? If so, make sure you update Internet Explorer to the latest version as Sourcetree relies on it for the authentication part. After that, do the following:

* Turn off compatibility mode in IE. To do that, open Internet Explorer, go to the *Advanced options* tab and click on *Reset your Internet Explorer Settings*
* Check *Delete personal settings*
* Change your Internet Explorer Security Zone Settings:

1. Open IE, click on the gear
2. Select "Internet Options"
3. Select the "Security" tab
4. Select "Custom Level" for Internet
5. Find "Access data sources across domains" and select "Enable" (make note of what the setting currently is)
6. Try logging into Sourcetree again

After logging in, follow steps 1-5, but ***reset the setting back to the previous option***.

Regarding the license, Sourcetree no longer needs it so you can ignore that part.

Let us know if you're able to sign in now!

Bes tregards,

Ana
Atlassian ID???????Butbucket??Clone?????
Asked by kam19_77:

??????BitbucketID???????????????????????????AtlassianID???????

https://myusername@bitbucket.org/hoge/fuga.git

?????ID?????URL??????????Clone?????????????????????????????????

??URL??ID???????

<https://bitbucket.org/hoge/fuga.git>

?????URL????????????username/password????????Clone????????????????????

????????????????????????????


Answers:
author: Ai Hirama
body: Atlassian Community???????????????????

????????????????????  
??????ID???????????????????????????[????????????????](https://getsupport.atlassian.com/servicedesk/customer/portal/6?_ga=2.219499929.1660781979.1515456425-1520594938.1513308356)???????????????  
????????????????????????????

?????????? ???


Tags: language-ja
SourceTree commits diff between two branches
Asked by Velizar Zlatev:

Hello,

Is it possible to see the differences between two branches as commits just like in gitlab when you open a PR you can see summary of commits diff and below you have files diff. Currently in sourcetree if you hold down cmnd key on osx and select the two branches you can see only the files difference. Is there an option to see the commits difference?

Regards


Answers:
author: bgannin
body: There is not currently a feature for this, please vote on or file a ticket at [https://jira.atlassian.com/browse/SRCTREE/](https://jira.atlassian.com/browse/SRCTREE/?)

comments: author: Velizar Zlatev
body: Thank you for the information! I hope we will see it soon as it is really useful feature.