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,465,926
Community Members
 
Community Events
176
Community Groups

Is there a way to deploy laravel app through pipelines to AWS using ssh and Git Pull?

I plan to deploy the master branch onto the AWS EC2 instance by using ssh and git pull to retrieve the resource merged in the master branch and update the resources on EC2.

so the script goes as :

apt-get install -y ssh
ssh -i user@ipaddress
cd <directory>
git pull repository-url
php artisan migrate
php artisan optimize
composer dump-autoload
Somehow I get the error when using ssh
E: Unable to locate package ssh
./devops/build-for-production.sh: line 4: ssh: command not found
I am using PHP:7.4-fpm image. Can anyone help me with this? I have been stuck for weeks.

1 answer

0 votes
Patrik S Atlassian Team Aug 03, 2022

Hello @Jeffrey Jacobo ,

Welcome to Atlassian Community.

This error usually happens when the package list of your system, in this case the container with php:7.4-fpm image, is not updated or does not have this package (ssh) available to be installed.

In order to re-synchronize the package index files from their remote sources, you should first execute :

apt-get update

This will download the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies.

After it, you can then install the package by running 

apt-get install -y ssh

You can try changing your script to include the commands above and let us know how it goes.

Thank you, @Jeffrey Jacobo .

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events