youngmon/atlassian-qna huggingface dataset:
Is it possible to get an authentication token through OAuth 2.0 using an app password?
Asked by argentum47:

I am trying to let users of my application post issues directly to a repository. To do this, I have set up an account for the application that also has access to the repository. Before creating an issue we need to get an authentication token as per [this article](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-issue-tracker/#api-repositories-workspace-repo-slug-issues-post). I am looking to use the OAuth2.0 Password grant type and the password I wish to use is my app password as opposed to my actual password. This is because with the app password I can manage the scope of access that the password has and if it were to get exposed it does not pose a major security risk.

Is this at all possible or should I be going about this in another way altogether?


Answers:
author: Caroline R
body: Hi, [@argentum47](/t5/user/viewprofilepage/user-id/4325410)!

Thank you for reaching out to Atlassian Community!

When creating an OAuth, you shouldn't inform your password or an app password, so I would like to clarify where you are using a password. In case you would like to read the process to create an OAuth, you can access the following link:

* <https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/>

What you could do is use an [App password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) to authenticate this request instead of an OAuth.

Please feel free to correct me in case I have misunderstood something here.

Kind regards,  
Caroline

comments: author: argentum47
body: Hi, [@Caroline R](/t5/user/viewprofilepage/user-id/3934006)

As per the link you sent, I'm using one of the four RFC-6749 grant flows, specifically the password grant type. I'm realizing now that If I'm to use the app password, I can't use it to get the OAuth token but I should be using basic authentication instead.

Thank you for the assistance!


author: Vishwas
body: Hi [@argentum47](/t5/user/viewprofilepage/user-id/4325410)

I believe the purpose of creating Oauth2.0 token is to use this as password instead of actual password in other applications so that it reduces to login over and again.

Regards,

Vishwas

comments: author: argentum47
body: Hi [@Vishwas](/t5/user/viewprofilepage/user-id/1231381) ,

I realize now that using the App Password and Basic authentication is what I need to do. Using an Oauth2.0 token wouldn't work for my use case as it expires.

Thank you for your insight!


Tags: bitbucket-cloud

cloud
Can't connect to bitbucket.org or atlassain sites from static IP
Asked by Michael Longo:

Hello All, New to the community. i have moved our servers into a colocation space. I was given a static IP by our ISP, but for some reason, i cannot get to bitbucket.com from the assigned IP. Tracert and MTR all come back clean. DNS is resolving correctly, i can ping all day long, but when I open up bitbucket.org, i get an http2 error page. i know it is not internal, as I have hooked up a laptop directly to the incoming ISP port and assigned the static. It fails. When I hook the same laptop to a different ISP or hotspot, i can get to it. The ISP says bitbucket may be blocking the subnet. Anyone have any ideas or suggestions?


Answers:
author: Rajrup Das
body: Same problem, i cannot able to clone my repos to work cloning form others works fine and my connection speeds are 50mbps

tell me where i can get that mtr tool?


author: Theodora Boudale
body: Hi [@Michael Longo](/t5/user/viewprofilepage/user-id/4696312),

Can you please confirm if you have trouble accessing Bitbucket Cloud (<https://bitbucket.org/>)?

I am asking because you mention bitbucket.com and I also don't see a Bitbucket Cloud account in our system with the same email as your community account.

If you are indeed having issues with Bitbucket Cloud, I can create a support ticket for you that will be visible only to you and Atlassian staff. You can then share in the ticket the static IP you are using, and the support team can check if it's blacklisted.

Kind regards,  
Theodora


author: Pramodh M
body: Hi [@Michael Longo](/t5/user/viewprofilepage/user-id/4696312)

Welcome to the Community!!

The IP is used only for whitelisting so that traffic is allowed. Even though you can ping the resolution at a later time may happen to different IP and the one which you were reaching out to becomes obsolete.

Use the Domain itself to reach out to the site.

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

Here's a list of inbound dynamic IP list that Atlassian has provided

<https://ip-ranges.atlassian.com>

Thanks,  
Pramodh

comments: author: Michael Longo
body: Thank you for the reply. We have ruled out internal routing issues by hooking a laptop directly to our ISP. With no firewall (Physical or software), and no network equipment in front of the connection, we still can't get to the site. We then installed a software VPN on the machine we were originally trying to connect from (with all network/firewall equipment in place), and were able to get to the site, and run our codes with it active. This leads us to believe either our ISP is blocking traffic upstream somewhere (although they claim they aren't), or the newly assigned IP block we were given is listed on a DoS attack list somewhere.


Tags: bitbucket-cloud

cloud
Error execute custom pipeline
Asked by Thiago Andrade:

Hi guys!  
I'm having the following problem running a pipeline in custom.

Code pipeline:

pipelines:  
custom:  
api:  
branches:  
master:  
- step: \*build  
- step: \*deploy

Message error: There is an error in your bitbucket-pipelines.yml at \[pipelines \> custom \> api\]. To be precise: This section should be a list (it is currently defined as a map).


Answers:
author: Igor Stoyanov
body: [@Thiago Andrade](/t5/user/viewprofilepage/user-id/4696049) hi. Thanks for your question. Try to follow this example:  

```
image:
  name: python:3.9

test: &test
  step:
    name: Test
    service:
      docker
    script:
      - echo test


pipelines:
  custom:
    api:
      - <<: *test
  branches:
    master:
      - <<: *test
```

As you can see \`branches\` and \`custom\` should be on one level. Also you need to add logic of step to your \`api\` section.  

More info you can find here: [pipeline-triggers/#Steps](https://support.atlassian.com/bitbucket-cloud/docs/pipeline-triggers/#Steps)   

Regards, Igor.


Tags: bitbucket-pipelines

cloud
Source Tree Account Registration
Asked by Omar Al-Khalili:

Source Tree trial period is ended, am trying to register with my atlassian account but source tree keep giving me incorrect password, I tried to reset the password and it was reseted successfuly (I was able to login again) but still source tree is not accepting the account login.

How can I proceed to resolve this problem?


Answers:
author: HenriqueA
body: Hi Omar,  

I would recommend you to try using the latest SourceTree version.  

If the issue persist please raise a Support Case at <https://support.atlassian.com> so the SourceTree engineers can check your Atlassian account :smile:  

Kind Regards,  
Henrique Lechner
How to delete multiple tags in SourceTree
Asked by Terry Beavers:

We have multiple build tags in BitBucket that I want to delete since they are no longer needed. The tag names start with "sqa_", such as sqa_v14.1.1_b100, sqa_v14.1.1_b101, etc.

It looks like it is possible to delete multiple branches through SourceTree using a checkbox, but I do not see similar functionality available for tags.

Is it possible to delete multiple tags through SourceTree and if so, how?

Thanks for your support,

Terry


Answers:
author: Gautham Kumar Bavandla
body: +1


author: bauerdev
body: I run this in terminal:

*$ git tag -l \| xargs git tag -d*

(source: <https://stackoverflow.com/questions/1841341/remove-local-git-tags-that-are-no-longer-on-the-remote-repository>)

I tried to add this as 'Custom Action' in SourceTree, but I get '

launch path not accessible', no easy fix (which is beyond me, looks simple enough, run a git command).


author: Virendra Shekhawat
body: +1


author: Daniel Fritzsch
body: +1


author: Daniel Kl?ck
body: Me too


author: Simone Scarduzio
body: Please make this happen, I need this in a regular basis!


author: rbrock
body: I need that too.
SourceTree for Windows Installation problem
Asked by MassimoManca:

I was updating SourceTree to 1.6.4 release. But installation fails very soon updating component registration with this message: "Chiave non utilizzabile nello stato specificato" that is the Italian for something like "key not valid for use in the specified state"; of course the English message should be a little bit different.

After that closing the pop up window exits the installation of SourceTree, so now I have no SourceTree installed.


Answers:
author: HenriqueA
body: Hi Massimo,  

It seems that you've faced the following bug:

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

I would suggest you to try to remove for a moment the Microsoft **KB2962490** Security Fix and try it again.  

Kind Regards,  
Henrique Lechner  

<br />
SourceTree Always Shows Two-Way merge with Filemerge.
Asked by August Junkala:

I have recently setup a new co-worker w/ SourceTree. When he tries to resolve conflicts it uses Filemerge and always shows a two-way view. We have been unable to find a difference between my setup (I get three-way merges) and his without any luck. Is there any known cause for this?


Answers:
author: windwagon
body: I've had that happen. If you look at the horizontal line that is the bottom border of the right and left panes, in the center you should see a very small, half-shaded, circle. Drag up on that and the third pane will appear.
Why sourceTree not pruning github's deleted branches?
Asked by Christian:

Hi,

I'm using sourceTree with github as a central repo. When my collegues merge and delete some branches, they are not deleted from my local repo, although I did check "prune" in the fetch dialog. What am I missing?

Thanks :smile:


Answers:
author: Seth
body: Did your colleagues delete those branches from GitHub, or just their local repositories? In SourceTree, neither deleting or force-deleting a local branch deletes from remotes - you need to find the branch in the "remote branches" list and delete it from there.

comments: author: Christian
body: I confirm that the branches are no longer present on github.


author: Seth
body: Lookup how to do a fetch + prune from the command line, and test that. That will identify whether the problem is with SourceTree, or your Git version.If it works from command line, submit a bug report for SourceTree at <http://jira.atlassian.com>


author: Seth
body: I suppose it's also possible that if, before you tried to prune, you did a fetch without pruning (SourceTree might be configured to do this automatically), then the earlier fetch might have removed the link between the local branch and the remote, making the later fetch think that those are local-only branches.
Why am I unable to access hosted repositories on Mac?
Asked by Andrew McAuliffe:

I have a locally available instance of Stash (ex, <http://stashserver:7990)> that I am able to log in to via my web browser. I have added this server via the Hosted Repositories dialog in SourceTree. However, on the window that normally lists all of the projects I have available to me on the remote Stash instance, the spinner animation just spins and spins and the projects never list.

I have tried accessing the same Stash server via SourceTree on Windows and the projects list populates correctly.

I am on OS X 10.9.4 running SourceTree version 1.9.8.


Answers:
author: Mehmet Kazgan
body: Usually this is caused by SSL certificate issue, check this URL:

<https://confluence.atlassian.com/display/SOURCETREEKB/Resolving+SSL+Self-Signed+Certificate+Errors>


Tags: bitbucket-server

mac
SourceTree can't use the commit template
Asked by ericye:

I have saved my comment template in $HOME/.gitmessage.txt and in the terminal, run "git config --global commit.template $HOME/.gitmessage.txt" and "git config commit.template $HOME/.gitmessage.txt". Now when I commit in command line or the source terminal, the comment template can take effect.

But when I click "Commit" in SourceTree GUI, the comment window is blank.

My operations is same to the answer of [git config commit.template apparently not working](https://answers.atlassian.com/questions/143622), but still can't work.

I am using SourceTree 1.6.4


Answers:
author: Stephan Badragan
body: same problem here


author: Dennis
body: I used the repository settings in SourceTree but whatever I type in it is not working. I re-started source tree and I can still see the text but it never appears at commit ??

![st.png](https://community.atlassian.com/t5/image/serverpage/image-id/55667i2A20FEFBFC60C0D1/image-size/large?v=v2&px=999 "st.png")


author: Guillaume B.
body: I'm using sourcetree version 2.4 on MacOSX 10.11.6, still not working ...   
That's really annoying


author: John Richards
body: I agree this doesn't seem to work.

We are implementing a standard template here and those who use TortoiseGit see the template but it never seems to show up in SourceTree.

This is on Windows in 1.6.14.0 using System Git 1.9.5

Any chance of a fix?


author: Raistlin Majere
body: Apparently it was implemented here:

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

But it doesn't work in 1.6.x series, so...
SourceTree GitFlow won't finish feature
Asked by Dan Parker:

So I think I have the config correct,

when I click on gitflow, it says next action and lists:

'Finish Feature'

when I click it, the 'Feature Name' dropdown is blank though.

My branch is: 'feature-1200' and under feature name it shows '1200' for 1/2 a second and then goes away.


Answers:
author: Johan Zwarteveld
body: I had the same issue. the following solved it for me.

start the terminal from sourcetree while the affected repository tab is selected / active.

type "git flow config" and press enter.

In my case all prefixes were empty.  
If it is that same for you try the following:

1. Type "git flow init -f" to force a new git flow initialization.
2. Fill in the proper branch names when prompted:
   1. master
   2. develop
3. Fill in the branch prefixes when prompted:
   1. feature/
   2. bugfix/
   3. release/
   4. hotfix/
   5. support/
4. Fill in the Version prefix when prompted if you use it or just press enter.

i hope this will help some of you running into the same issue

comments: author: Miroslav Vanick?
body: It works for me, thank you.


author: Johan Zwarteveld
body: For future reference.

this issue originates from the latest gitflow release that is incorporated in the latest git for windows release. (2.21.0)  

so on every new gitflow initialisation the above should be redone


author: dor_shiff
body: Same issue here


author: Yuval Klein
body: I have the same issue.


author: Steffen Bech Balle
body: I don' know why, but when it happens for me, I usually just rename the feature or release branch I am on, then try and finish it again. Works every time.


author: Hannah Schinz
body: Same issue. Still appears to be in current version.


author: Miroslav Kme?
body: I am having the same problem with gitFlow. At first, the feature/hotfix name is displayed, but after about one second it disappears completely


author: SteveEllwoodNLC
body: I get the same with HGFlow


author: Saray
body: I am facing the same problem.


author: Seth
body: Would you mind posting your gitflow config?

comments: author: sdfdsf
body: same problem here
Has the source tree team considered an option for the graph to show lines that strictly correspond to branches?
Asked by jrood:

I'm very greatful to the Atlassian team that has worked on Source tree. I work with an iterative development team of 7 programmers, and in many ways, it has been a very helpful repo management product. However, when we look at the log / history for a repo, we are often trying to figure out exactly when one branch is split, when which one is merged with which, and what commits are made on each branch. If each line strictly represented each branch, this would be easy to determine, but because the lines are organized topologically, it is significantly more difficult and less intuitive. I know that branches can be deleted, and that this is part of the reasoning why the lines are not organized strictly by branch, but couldn't commits on deleted branches just be displayed in a seperate column or grayed out line? In situations where two developers made commits one their local repositories and then merged, could this be displayed by the same line just splitting (being the same color on both sides) and then being merged back together?

I think that, when git users think about branching, they often picture a tree-like representation where each line represents a different branch. The fact that Source tree has a graphical representation for a repo where each line doesn't actually represent a branch, but some kind of topological psudo-branch, is confusing. I believe that Source Tree would be a much more intuitive and helpful product if there was an option for each branch to just correspond to one colored line.


Answers:
author: Bal?zs Szakm?ry
body: You should file a feature request [here](https://jira.atlassian.com/browse/SRCTREEWIN).
git clone git@foo.bar.com:abcd
Asked by joshua smith:

Hi,

I've used git bash so far and am now trying sourcetree. To clone my repository via command line (git bash), I used the format

git clone git@foo.bar.com:abcd

The repository is not on github or bitbucket.

How do I use these same clone parameters in sourcetree to clone that repository?

Thanks


Answers:
author: Bal?zs Szakm?ry
body: In order for the SourceTree clone dialog (opens with CTRL+N) to accept the address as valid, it needs to start with the protocol, e.g. http://[git@foo.bar.com](mailto:git@foo.bar.com):abcd

comments: author: joshua smith
body: but that's not a valid http url.

At the git reference - <http://git-scm.com/docs/git-clone>

it states ..  
An alternative scp-like syntax may also be used with the ssh protocol:  
* \[user@\]host.xz:path/to/repo.git/

So it's a valid command line syntax.

So sourcetree doesn't support that?  


author: Seth
body: So it sounds like you want the ssh:// protocol instead of http:// or https://


Tags: clone

git
Change branch for automatic push on commit
Asked by Kane McConnell:

I love the feature of automatically pushing to a remote upon commit. Saves extra clicks. But if working with multiple remotes, it doesn't seem to let you update where the automatic push goes. Seems to be based on the last remote you published the branch to. Is there a way to change that? If not can that be added to the feature requests?


Answers:
author: Bal?zs Szakm?ry
body: This is not currently possible. You should file a feature request [here](https://jira.atlassian.com/browse/SRCTREEWIN).


Tags: automation

commit

feature

push
How to get a specific tagged version of code project from Sourcetree without effecting the existing code base
Asked by Sibaram Subudhi:

Hello Team,

Our Java project is in sourcetree and we tagged multiple times during the development phase. We are still working on it. Now my question is how can i get the code base based on a specific tagged version without impacting the present codebase.

I want to get the tagged version to some other location.

Could you please assist me by providing the steps to perform.

Thanks,

Sibaram


Answers:
author: Bal?zs Szakm?ry
body: You need to create another clone either by copying the firs clone to a different folder or cloning the repository from the server to a new folder. Afterwards, you can check out the tag the same way you would check out a branch.

comments: author: Sibaram Subudhi
body: I am not getting the solution correctly. Could you please help me by mentioning in steps. I am using Sourcetree.


author: Seth
body: In SourceTree, click "Clone/New". For the SourcePath, use the same remote as your existing repo, but choose a new local folder. This will give you a second repository on your machine. You can keep the first as the "present codebase", and use the second to check out old tags.


author: Sibaram Subudhi
body: Thank You Seth.


author: Seth
body: If you want a single use copy of the tagged version of code, rather than a full-featured repository, try the git archive command: <http://git-scm.com/docs/git-archive>
Is there a way to prevent SourceTree to switch to Log/History tab after commit?
Asked by danaketh:

It's really annoying when after every commit SourceTree switches to the Log/History tab and I have to switch back. Options which used to keep the commit box opened after commit is still there (while the box was removed) but it have no effect on the current layout.

Is there a way to tell ST not to do this and stay on the File Status tab? And if not, would it be possible to add such feature?

Thanks


Answers:
author: Seth
body: I don't know of any. If you don't get a helpful response here in a few days, post a bug report about the "keep commit box opened" option to [jira.atlassian.com](http://jira.atlassian.com).
How to set up Sourcetree
Asked by Huevos:

I am migrating from Smartgit 3. In Smartgit I can pull (and push) from Github without problems.

In Sourcetree I can read from my local gits, but for some reason I cannot pull (or push) from Github.

Any idea what I can have done wrong in setting this up? I tried removing Sourcetree and reinstalling but it remembers everything from before the new install.


Answers:
author: darylchuah
body: Hi Huevos

You can refer to the following links to see whether if it helps or not:

* <https://confluence.atlassian.com/display/SOURCETREEKB/Two-Factor+Authentication+(2FA)+with+GitHub+in+SourceTree>
* [I can't connect to Github from Sourcetree](https://answers.atlassian.com/questions/270331)


author: Huevos
body: Yes, pull button was clickable. It was an authentication problem.

Two other problems. It won't allow me to use my SSH key. When I try to add it it asks for the passphrase and then tells me the passphrase is wrong.

Other problem is I am tracking two remotes. One of the remotes is a copy of my local and the other is pretty different. I want to cherry pick off this remote and incorporate the changes into my local. How do I do it? So I maybe want to pick 5 commits off this remote and have them show up as one merge on my local.

comments: author: Seth
body: Please post your questions as new questions, not as an answer to an existing, unrelated question.


author: Seth
body: Also, accept Daryl's answer if it helped you.


author: Seth
body: A little more description of the problem would be helpful. Are you able to click the push/pull buttons? What happens when you do? Are there any error messages in the interface?
SourceTree display/commit empty folder
Asked by Larry Lowry:

When using SourceTree if I add an empty directory it does not show up in the unstaged files pane. I have show all files checked.

I cannot find a way to add and commit an empty directory.

It will only show up if there is a file in the directory.

Thanks.


Answers:
author: Duane Murphy
body: This is not a problem with SourceTree. git only manages files. You must include a file in the directory.

There are several solutions to putting a file in this directory.

A dummy .gitignore file is often used. If you want the directory to appear but the contents to be ignored by git, you can add

\*

!.gitignore

To the .gitignore file. This ignores everything in the directory except the .gitignore file.


author: LarsM
body: That's not a SourceTree Problem - this is a git limitation. Git only allows files in the index. Check this article <https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F>

you could put a readme file into the directory to commit the directory.