The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error connecting to my server when using pipelines

ebelangerjcl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2024

I'm having issues connecting to my server in my pipelines.

I have tried in my pipelines custom ssh, atlassian/ssh-run, atlassian/scp-deploy, and atalssian/rsync-deploy. All of them failes at connecting to the server

Here are all the tries in my pipeline:

```

 

- step:
script:
- ssh -p 9999 -o StrictHostKeyChecking=no -i ~/.ssh/bitbucket_work $USER@$SERVER
- cd /home/xxxxx/domains/xxxxx.dev/public_html/folder_path/
- touch test-ssh-2024-09-27.txt
- step:
name: SSH INTO SERVER
script:
- pipe: atlassian/ssh-run:0.8.1
variables:
SSH_USER: $USER
SERVER: $SERVER
COMMAND: "echo $USER && echo $SERVER && cd /home/xxxxx/domains/xxxxx.dev/public_html/folder_path/; touch test-ssh-2024-09-27.txt;"
PORT: 9999
# EXTRA_ARGS: "-i ~/.ssh/bitbucket_work"
- step:
name: Transfer the dist forlder to the server
script:
- pipe: atlassian/scp-deploy:1.5.1
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: "/home/xxxxx/domains/xxxxx.dev/public_html/folder_path/folder_name"
LOCAL_PATH: "dist/*"
DEBUG: "true"
EXTRA_ARGS: ["-P", "9999", "-i", "~/.ssh/bitbucket_work"]
- step:
name: Transfer the dist with rsync
script:
- pipe: atlassian/rsync-deploy:0.13.0
variables:
USER: $USER
SERVER: $SERVER
REMOTE_PATH: "/home/xxxxx/domains/xxxxx.dev/public_html/folder_path/folder_name"
LOCAL_PATH: "dist/*"
DEBUG: "true"
SSH_PORT: 9999
# EXTRA_ARGS: ["-e", "ssh -p 9999", "-i", "~/.ssh/bitbucket_work"]
EXTRA_ARGS:
- "~/.ssh/bitbucket_work"
```
Here is one of the error :

Screenshot 2024-10-11 at 10.03.26 AM.png
The main problem i see is that I tell the pipeline to go to ~/.ssh/ but in the pipeline command you see that it goes to /root/.ssh/.

On the server where I connect, I do not have access to the /root/ but ~ I have.

I know that the credentials works because in my terminal, if I run the same command, I'm able to connect but i'm never in root.

Is it possible to make the pipeline not ask for root but ~ ?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 13, 2024

Hi @ebelangerjcl 

We will need you to raise a ticket with our support team to assist you further - as we will need access to your build logs/YML config and will require you to share potentially sensitive information that would not be appropriate to share on a public forum such as Community.

Given that you are a Standard subscriber, you are entitled to support directly from our support team - please raise a request using your workspace URL at the link below:

If you are having issues raising a ticket, please let me know your timezone so I can raise one on your behalf and ensure you receive support from a technician in your location.

Cheers!

- Ben (Bitbucket Cloud Support)

 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events