youngmon/atlassian-qna huggingface dataset:
Git pull always shows error "Permission denied (publickey). fatal: Could not read from remote repos"
Asked by Arjun Thakur:

I was already configure the ssh key in my bitbucket access key location.  
I am using atlassian/ssh-run:0.4.0 module for ssh it is working fine but when my bash script command runs then git pull shows error "  
Permission denied (publickey).  
fatal: Could not read from remote repository.  
Please make sure you have the correct access rights"  
this is my bash script code :-  
#!/bin/bash

if \[\[ "$BRANCH" == "featurecicd" \]\]; then  
echo 'Aborting script';  
cd /usr/share/nginx/html/........../.../.../../  
pwd  
sudo git stash

repos=(  
"featurecicd"  
)  
echo ""  
echo "Getting latest for" ${#repos\[@\]} "repositories using pull"

for repo in "${repos\[@\]}"  
do  
echo ""  
echo "\*\*\*\*\*\* Getting latest for" ${repo} "\*\*\*\*\*\*"  
cd "${repo}"  
sudo git pull  
echo "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"  
done

#sudo git pull  
sudo git stash pop  
npm i  
npm run build  

when I runs these command in my server manually it not show any error  
my git remote already added ssh type  

plz


Answers:
author: Theodora Boudale
body: Hi [@Arjun Thakur](/t5/user/viewprofilepage/user-id/5124189) and welcome to the community!

I would like to ask some questions so I can better help you:

**1.** I see that you are using **sudo** with the **git pull** command. Were the clone directories created with the root user?

**2.** When you use sudo, the command will try the SSH keys associated with the root user. Have you set up SSH keys for the root user on this machine?

Please note that I am referring to the SSH keys configured for the user on this server in order to connect via SSH to Bitbucket and pull, and not the SSH keys you configured for the pipe in order to connect to your server.

**3.** For further troubleshooting, you can add the argument GIT_SSH_COMMAND="ssh -vvv" to the sudo git pull command as follows:

```
sudo GIT_SSH_COMMAND="ssh -vvv" git pull
```

The output will show you the path of the .ssh directory where the command is looking for keys and which keys are tried. Is the local key you created being offered?

Kind regards,  
Theodora

comments: author: Ankit Dogra
body: thanks, now my problem is resolved.


author: Theodora Boudale
body: That's good to hear, please feel free to reach out if you ever need anything else.


Tags: bitbucket-cloud

cloud
I have enabled Two-step verification. but not received email to finish enabling two-step verificatio
Asked by mahesh:

I reinstalled the two-step verification app. Now trying to enable it. but not receiving email to finish enabling two-step verification.


Answers:
author: Patrik S
body: Hello [@mahesh](/t5/user/viewprofilepage/user-id/5123985) ,

I've checked for the bitbucket account with the same e-mail as your community account, and it seems you already successfully enabled 2FA.

In case you are still facing any issues receiving the e-mail, please let me know.

Thank you, [@mahesh](/t5/user/viewprofilepage/user-id/5123985) .

Patrik S


Tags: bitbucket-cloud

cloud
How to restrict a deployment to be possible only from a specific branch using Bitbucket API?
Asked by silvr:

Basically I want to be able to add the branch restriction shown in this article through Bitbucket REST API to automate the setup of new repositories:  
<https://bitbucket.org/blog/deployment-permissions-now-available-in-bitbucket-pipelines>

Anyone who have done this before could share the details on how to achieve this?

![2023-01-17_19-57.png](/t5/image/serverpage/image-id/234933i5FA0583A65609EDA/image-size/large?v=v2&px=999 "2023-01-17_19-57.png")


Answers:
author: Theodora Boudale
body: Hi [@silvr](/t5/user/viewprofilepage/user-id/3417260),

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

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

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

You can add your vote (by selecting the **Vote for this issue** link) and leave a comment there to express your interest.

Kind regards,  
Theodora

comments: author: silvr
body: Thanks for the reply! I'll watch closely this issue.


author: Theodora Boudale
body: You are very welcome, please feel free to reach out if you ever need anything else!


author: Ulrich Kuhnhardt _IzymesCo_
body: Please have a look at the Bitbucket/Pipelines REST API

<https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-put>

I couldn't find a detailed data model, but I suppose you can fetch an existing config via <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-config-get>

Hope that helps,

Ulrich

[// Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

deployment

rest-api

restriction
Why I need to authenticate again with SSO to clone a new repo?
Asked by jose.paredes:

I have done my personal SSH keys on macOS settings. When I try to clone the repo in a new directory, I get the error:

```
git@bitbucket.org:Permission denied (publickey).
fatal: Could not read from remote repository
```

I thought my permissions was done once I configure the SSH key.

Thanks


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

Your ssh client may not be offering the key you have added to your Bitbucket Cloud account, or the key may not be loaded to your SSH agent.

Can you try adding the following in the **\~/.ssh/config** file on your macOS (if the file doesn't exist, you can create it):

```
Host bitbucket.org
    HostName bitbucket.org
    PreferredAuthentications publickey
    IdentityFile /Users/User/.ssh/id_rsa
```

where **/Users/User/.ssh/id_rsa** replace with the path and name of your private SSH key, whose public key is uploaded to your Bitbucket account.

Afterwards, try cloning again, and feel free to let me know how it goes.

Kind regards,  
Theodora

comments: author: jose.paredes
body: Thank you, [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) !

Yes, the key was neither generated nor enabled in my SSH agent. I had to use the command:   

    ssh-keygen -t rsa

And then copy the key type in "Selected SSH kyes" of my repo.

Regards,

Jose


Tags: bitbucket-cloud

cloud
We couldn?t log you in problem!
Asked by dimro2008:

I can't log in. Help me please!![Screenshot_5.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/234924i4686C8B8BEE5A014/image-size/large?v=v2&px=999 "Screenshot_5.jpg")


Answers:
author: Theodora Boudale
body: Hi [@dimro2008](/t5/user/viewprofilepage/user-id/5123909),

Your Bitbucket Cloud account was in a dormant state due to inactivity. I went ahead and reactivated it, so you should be able to log in now.

Please feel free to let me know how it goes and if you need anything further.

Kind regards,  
Theodora

comments: author: dimro2008
body: Thank you!


author: Theodora Boudale
body: You are very welcome! Feel free to reach out if you ever need anything else!


author: Mike Flannery
body: Hi,

It looks like I am in the same situation. Can you check my account, or is there a way to reactivate manually.

Thanks.


author: Theodora Boudale
body: Hi [@Mike Flannery](/t5/user/viewprofilepage/user-id/5184083),

Apologies for the late reply, I was out of office for some time. I can see that you created a support ticket for this issue and your account has been reactivated. Please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


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

This really is what is says, there's something broken in your browser or network, that is clobbering the referrer header.

Could you try a different browser?

comments: author: dimro2008
body: I've tried different. Chrome, Firefox, Opera, the same problem. Could it be because of ESET Internet Security antivirus?


Tags: bitbucket-cloud

cloud
How to remove repository I did not create?
Asked by Masis Nguyen:

On <https://bitbucket.org> when I click on "Your work" I see a repository that I did not create. I want to remove it from my list of repositories. How do I do that? There is no "Repository settings" option that I can use to delete this repository.

The repository I want to delete that shows up on my account is:

<https://bitbucket.org/adamof/rails-poker>

Why is this even linked to my account at:

<https://bitbucket.org/masisnguyen>

And how do I un-link these two accounts?


Answers:
author: Syahrul
body: Hey [@Masis Nguyen](/t5/user/viewprofilepage/user-id/5123835)

G'day, and welcome to the community!

I can see that you have access to the Workspace and have been granted access to the Workspace; hence you can view the repository.

Unfortunately, there's no way to remove yourself from the repository since you only have read access unless the workspace owner remove the access, but you can leave the Workspace if you no longer wish by following these steps:

1. Click your avatar in the top right-hand corner of the screen
2. Click **"All Workspaces"** to show a list of the workspaces you currently belong to
3. Find **"[adamof](https://bitbucket.org/adamof)"** on this list and click the **"Leave"** button under the **"Actions"** on the right-hand side
4. This will bring up a prompt to leave the workspace. To finalize the changes - you will need to click the **"Leave Workspace"** button.

I hope this helps.

Cheers,  
Syahrul

comments: author: Masis Nguyen
body: Thank you so much! That was exactly what I wanted to do.


Tags: bitbucket-cloud

cloud
Active Directory users cannot login
Asked by Kevin Goforth:

We have a setup a new Bitbucket server and configured a LDAP user directory for access. It is able to sync with the Active Directory group that we need it to, but the members of that group are not able to login. Currently Bitbucket is set up for HTTP only, Do I need to set it up for HTTPS to allow this type of authentication?


Answers:
author: Kevin Goforth
body: I think I have fixed it. Currently testing, but it appears I did not have the AD settings for the user directory setup completely, or at least not the way I wanted them.


author: Mahesh Shinde
body: Hi [@Kevin Goforth](/t5/user/viewprofilepage/user-id/3351352) :

Please, let me know if those users are part of the "bitbucket-user" group which is default group for Bitbucket application and also check the global permission for this group in Bitbucket.

Regards,

Mahesh Shinde

comments: author: Kevin Goforth
body: The only other group I see, other than the AD group, is the stash-users group. The users are not part of that group. I have attempted to add users to that group but it errors out.

The AD group has the Bitbucket user and Project Creator permissions.


Tags: bitbucket-server

server
How does a regex works in Scriptrunner
Asked by Margaria Vince:

Hello, I am currently working on a pre-hook for tags on scriptrunner that will force users to freeze there dependencies. I have a problem about that.  

I did a regex that checks this situation : .\*requires\\(\\"\[\^\\d\|_\|\\-\](\\S)+/\\\[(\\d)(\\.\\d)\*\\\]  
I did this regex using regex101.com based on a Java 8 flavor. The problem I have is that it seems that either scriptrunner does not understand this or it is that I don't know how to test my tags.

Is there someone that can help me please ?


Answers:
author: Jeroen Poismans
body: Hi there,

Do you have an Adaptavist account? They have a Script library where I found this script to user regex to check mail. With some change you should be able to get this to work on your regex:

<https://library.adaptavist.com/entity/use-regex-to-find-emails-address>

Regads,

Jeroen


Tags: bitbucket-server

script

scriptrunner

server

webhook
How to compare files using scriptrunner in a pre-hook ?
Asked by Margaria Vince:

Hello, I am currently working on a pre-hook that have the purpose of checking files and executing a regex based on the files found. Something similar to this example :  

if conanfile.txt

Regex A here

else

Regex B.

I can't seems to make it work and i'm kinda lost, is this actually possible ?


Answers:
author: Jeroen Poismans
body: Hi,

Did you take a look here:

<https://library.adaptavist.com/entity/use-regex-to-find-emails-address>

Regards,

Jeroen


Tags: script

scriptrunner

server
Docker-based runner on Kubernetes can't find kubernetes.default nslookup
Asked by Jorn Van Coillie:

When I try to do:

nslookup kubernetes.default

I get:

\*\* server can't find kubernetes.default: NXDOMAIN

So from inside the bitbucket-runner pod I can't find any kubernetes dns.

If I do the same test with dnsutils pod it works fine.


Answers:
author: Yevhen
body: [@Jorn Van Coillie](/t5/user/viewprofilepage/user-id/5105597) can you please share you runner pod yaml? Definitely networking messed up.

comments: author: Jorn Van Coillie
body: Thanks for the reply. After I updated the runner to latest version. I can access pods by dns name. Problem solved.


Tags: bitbucket-cloud

cloud
Bitbucket webhook connection to Jenkins/wendy
Asked by Jakub:

Hi All

Can you please tell me what is the syntax of the URL that I should give to the bitbucket?

Is it like:

"link to the jenkins job" +/bitbucket-scmsource-hook/notify**?**

**Or something else ?**

**Best Regards**

**Jakub**


Answers:
author: Erez Maadani
body: Hey [@Jakub](/t5/user/viewprofilepage/user-id/5123363) ,

Have a look here: <https://plugins.jenkins.io/generic-webhook-trigger/>


Tags: jenkins
Problem viewing file in repo (filenames start with "ad")
Asked by ?rni Steinunnarson:

Several files in our repository have been since yesterday unviewable in the web browser. There's just a spinning circle instead of the file contents and then it finally seems to time out and shows a generic error message. The repository is private so I can't link the error pages.

Of course we could get at the content we needed using git log and git show but these were not the optimal tools for the task. I tried to find where I can submit a bug report to Atlassian but apparently that sort of service is only available for paying customers.

I don't think the community can actually help, this seems to be an intermittent thing and doesn't affect all filenames starting with "ad". admin.py files will show up fine but ad.html and ad-overlay.html will not. I'm just posting this here because I have no other recourse.


Answers:
author: Ben
body: Hey ?rni,

Welcome to the Bitbucket Cloud community! :)

The reason you are likely experiencing this is due to an ad-blocker or some other plugin that you have enabled in your browser. Given that it is reading the word "ad" it may be suppressing the content as a result. I have troubleshooted very similar cases in the past and this was the root cause.

Please try viewing the files in either a different browser, or the same browser with add-ons disabled (or Incognito Mode in Chrome), make sure to clear your cache first as well.

If it ends up being the ad-blocker, I would suggest making exceptions for <https://bitbucket.org>

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: ?rni Steinunnarson
body: I can confirm that turning off ublock origin cleared up the issue. Thank you.


Tags: bitbucket-cloud

cloud
while i am cloning i get the following warning :- could not find UI helper 'Atlassian.Bitbucket.UI'
Asked by AMAN KUMAR:

could not find UI helper 'Atlassian.Bitbucket.UI' error while cloning. solutions please


Answers:
author: Jonathan Ward
body: I just had this and within a day of yourself. The issue seems to be a bug in the credential manager that comes with Git for Windows. The workaround is to roll back your git version it seems. I found this article: [Fix Git: Warning: could not find UI helper GitHub.UI on Windows (code2care.org)](https://code2care.org/git/warning-could-not-find-ui-helper-github-ui-on-windows)


Tags: bitbucket-cloud

cloud
Not receiving emails of pull requests
Asked by Ankur Savaliya:

Hi,   

I am not receiving emails after January 12, 2023 (pull requests updates, comments, and merge update) on my email id **\*\*\*\*\*@\*\*\*\*\*.\*\*\***   
Please help   

Ankur Savaliya


Answers:
author: Ben
body: Hey Ankur,

Just letting you know - I have censored out any personally identifiable information (email) as this is a public forum.

I have checked the email address you have specified and could see that it was added to our internal suppression list as we received an SMTP bounce error from your mail server:

```
550: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 https://support.google.com/mail/?p=NoSuch... - gsmtp?
```

I have removed your email from the suppression list so you should be able to receive emails now.

Can you test by having someone tag your username in a comment on a PR? Assuming you are subscribed to notifications in **Personal Settings \> Notifications** and the repository is being watched, you will receive this email.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Why can I not log in?
Asked by Ashia Lang:

I just created an account but I keep getting this error message when I try to log in to Sourcetree. Here is the error message: "Log in to continue - Log in with Atlassian account Something went wrong while attempting to validate your credentials."


Answers:
author: Ana Retamal
body: Hi Ashia! Have you tried to log in to [my.atlassian.com](https://my.atlassian.com/product) using your Atlassian account credentials, and see if you're able to log in?

Can you send us a screenshot of the step where you get stuck?

Which OS and Sourcetree version are you using?

Let us know!

Ana
Is there an issue with SourceTree 2.7.4?
Asked by David Middleton:

After auto-update to 2.7.4, I get warnings from Little Snitch about code signing being different on disk to running app, and that the app might have been tampered with.

I deleted the app and went to the download link on the sourcetreeapp.com site, but that download is for 2.7.3a


Answers:
author: Ana Retamal
body: Hi David, looks like you might need to look at the setting of Little Snitch.

Sourcetree 2.7.3.a is the version that has already been released to all our users, and the version you can find in our website. For some of our users we provide them with an early update, that's why yours was 2.7.4. Once you install Sourcetree again, you should be able to update to 2.7.4 if so you wish.

If you're still having issues, please send us a screenshot of the error you get so we can continue helping you.

Kind regards!

Ana

comments: author: David Middleton
body: Thanks Ana. Can't see any settings in Little Snitch that would affect this - it always checks code signatures to make sure applications haven't been modified.

Slightly weird in this case as it's saying the version on disk doesn't have a code signature, but the running app does?!

Screenshot attached.![Screen Shot 2018-05-25 at 13.53.23.png](https://community.atlassian.com/t5/image/serverpage/image-id/22964iBA70B16EE406D8F1/image-size/large?v=v2&px=999 "Screen Shot 2018-05-25 at 13.53.23.png")


author: David Middleton
body: Hi,

Any more news on this?

I did a search on Google for the error and the only results point to [this very similar SourceTree issue](https://community.atlassian.com/t5/Sourcetree-questions/Receiving-alert-quot-running-process-differs-from-the-version-on/qaq-p/773994)

I'm running on macOS 10.13.4 and I still get the error when running SourceTree 2.7.3a, so it seems not related directly to a specific version (or at least it happens in 2.7.1 thru 2.7.4).

Thanks,

David


Tags: mac
Is it safe to push and pull from a Mac OSX if my colleagues are using a windows OS?
Asked by Nicco Cezar:

My office is using Source Tree and Xampp for Windows in our natural working environment but I now have a Macbook and about to set up my Source Tree and Xampp from there. Is it safe for everyone if ever I was to pull and push from my Source Tree and Mac?

I kindly ask for help in order to avoid conflicts within the files.


Answers:
author: Manju
body: Make sure you run the following commands to set the right configuration for your repository,

on Mac:

```
git config --global core.autocrlf input
```

and on windows

```
git config --global core.autocrlf true
```


Tags: mac

pull-request

push

windows
Company wide sourcetree license
Asked by sanan sanan:

We want all our developers to use SourceTree as a standard GUI tool for working with Bitbucket.

Unfortunately, since, to use sourcetree, one need to have an Atlassian license and also accept license, we cannot package it in our Software Center from where user can install it. Though, we have got it whitelisted also from our info sec department.

Is there any way to have SourceTree installer that we can preset with license acceptance and does not need to have atlassian login so that we can provide it as pre-configurred package to all our developers via our Software Center.

Regards

sanan


Answers:
author: ofir gutmacher
body: Yes.

Install it in Main users PC.

Then, just copy and paste the folder to all users.

Make sure they will change their username and email after initial run.
Unable to login first time to Sourcetree at Bitbucket
Asked by Lennart Borgman:

I have just installed Sourcetree (and Windows Git). I can't login. There is a bug report here for similar problems, but no one seems to work on the bug:  

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

Should I just give up on Sourcetree for Windows, or?


Answers:
author: Ana Retamal
body: Hi Lennart, welcome to the Atlassian Community!

I've contacted the Sourcetree developers and they told me they are actively working on it, but there is no defined release date for it. Please keep an eye on the bug report for further updates!

Kind regards,

Ana

comments: author: Lennart Borgman
body: Thanks, that is good to know, but a bit surprising for a blocking bug.


author: Lennart Borgman
body: (deleted)


Tags: bitbucket-cloud

cloud

windows
Hi There, I get the error 'Something went wrong while attempting to validate your credentials.
Asked by Naveen Yadav:

Hi There,

I get the error

'Something went wrong while attempting to validate your credentials.'

when I tried to login with my own user and password.

I've even tried resetting my password and im using MAC.

Any ideas about this?

Thank you

Naveen Yadav


Answers:
author: Manju
body: Can you please specify what version of the app you are using and what host you are trying to sign in to?

comments: author: Suyayu
body: I am using version 2.5.5 source tree and tried with other version also but getting same error


author: Manju
body: Can you please update to the latest version 2.7.6 and try with that? Please let me know the host you are trying to connect to. Is it Bitbucket/GitHub? Add screenshots where ever you can and add some steps for us to understand exactly what is going on.


author: Suyayu
body: Please find the attached screen shot. Could you please let me know if any other option is available.![Untitled.png](https://community.atlassian.com/t5/image/serverpage/image-id/25574iB91745E7864B052E/image-size/large?v=v2&px=999 "Untitled.png")![Untitled1.png](https://community.atlassian.com/t5/image/serverpage/image-id/25573i7DFE221ACFA59853/image-size/large?v=v2&px=999 "Untitled1.png")


author: Manju
body: This is on windows. So sorry for the confusion. I will get our experts on windows answer this.


author: Anjul Pathak
body: Any Updates on this