Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,455,950
Community Members
 
Community Events
176
Community Groups

How can I deploy repository to Firebase with SSH key?

Edited

Hi everybody.

I'm absolutely new to Bitbucket, exactly start from thanksgiving day.

I'm going to deploy project to Firebase.

Then I have a error that unable to access to repo with requested url return 403.

I'm user of repo, not owner.

Please help me everybody.

How can I deploy repository to Firebase with SSH key?

Do I need the owner's SSH key? or else?

2 answers

Hi @Caroline R . Thanks for your kindness.

I set up SSH key, and then updated the remote URL to my repository to change the authentication to SSH before.

And then I'm going to deploy project of the repository by using pipeline as frontend.

I written file bitbucket_pipeline.yaml as follows:

 

image: atlassian/default-image:2

pipelines:

branches:

master:

- step:

name: 'Build and Test'

script:

- echo "Your build and test goes here..."

- step:

name: 'Updation'

script:

- echo "Pulling Latest code from the git"

- ssh $CREDIBLED_PROD_SERVER_USER@$CREDIBLED_PROD_SERVER "cd credibled_app && git pull"

- ssh $CREDIBLED_PROD_SERVER_USER@$CREDIBLED_PROD_SERVER "docker rm -f frontend && docker rmi frontend"

- step:

name: 'Deployment'

script:

- ssh $CREDIBLED_PROD_SERVER_USER@$CREDIBLED_PROD_SERVER "cd compose && docker-compose up -d frontend"

- echo "Application deployed successfully"

I'd like to know why I can't my repository with SSH key, and how to repair this if there is a way.

I hope you are very helpful forward. I'm waiting. 

Thanks.

From Maksim.

Caroline R Atlassian Team Dec 06, 2021

Hi, Maksim

Thanks for the additional information. We have the following guide on how to deploy to Firebase, which includes step by step instructions on how to use a pipe and a Firebase token to push:

If you prefer to stick to your approach and your YAML file, could you please confirm the following information:

  • Which command gives you an error?

  • What is the output of the command that is failing, now that you switched to SSH?

  • Can you access this server, $CREDIBLED_PROD_SERVER, outside of Pipelines? Either directly or via SSH from your machine? If so, can you try a git pull command in that directory directly from the server, and let us know what is the output then?

Please let me know how it goes and feel free to share any additional questions or concerns regarding this case. 

Kind regards,
Caroline

0 votes
Caroline R Atlassian Team Nov 30, 2021

Hi, @maksim kolin! Welcome to the community! 

By the error message you shared with us, I believe you were trying to use HTTPS to connect with your repository, is that correct? If that’s the case, we announced in June that we are phasing out the use of user login passwords for REST APIs and git over HTTPS.

We recently announced the first phase of this, where any user with an Atlassian account created on or after UTC 00:00 on 13 September 2021 must use a Bitbucket Cloud generated App Password for all git operations over HTTPS and for REST API authentication.

In this case, as you have recently created your account, you will need to use an App Password if you would like to use HTTPS. So I would ask you to please try to create and use an App Password and let me know if you have any problems using or configuring this, we will be happy to assist you. 

However, if you want to use SSH to authenticate, you will need to first Set up an SSH key, and then update the remote URL to your repository to change the authentication to SSH. You can follow the steps described in this doc to change the remote URL:

I hope this helps, but do let me know if you have any questions. 

Kind regards,
Caroline

Hi @Caroline R . Thanks for your kindness.

I set up SSH key, and then updated the remote URL to my repository to change the authentication to SSH before.

And then I'm going to deploy project of the repository by using pipeline as frontend.

I written file bitbucket_pipeline.yaml as follows:

 

image: atlassian/default-image:2

pipelines:

branches:

master:

- step:

name: 'Build and Test'

script:

- echo "Your build and test goes here..."

- step:

name: 'Updation'

script:

- echo "Pulling Latest code from the git"

- ssh $CREDIBLED_PROD_SERVER_USER@$CREDIBLED_PROD_SERVER "cd credibled_app && git pull"

- ssh $CREDIBLED_PROD_SERVER_USER@$CREDIBLED_PROD_SERVER "docker rm -f frontend && docker rmi frontend"

- step:

name: 'Deployment'

script:

- ssh $CREDIBLED_PROD_SERVER_USER@$CREDIBLED_PROD_SERVER "cd compose && docker-compose up -d frontend"

- echo "Application deployed successfully"

I'd like to know why I can't my repository with SSH key, and how to repair this if there is a way.

I hope you are very helpful forward. I'm waiting. 

Thanks.

From Maksim.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events