i have my .yml file as follows and i added the repository variables and ssh keys and everything seems to be fine however, my pipeline reaches the command step and doesn`t move further , how can i solve this ?
here is the yml file and the step it stops at.
Hi, @ali sakr alaraby! Welcome to the community!
In order to further investigate this issue, could you please follow the next steps and share the output with us?
1. Add
Debug: "true"
in the Pipe configuration and check the output. This will help us to get more logs that can help us to investigate the issue further
2. Use
COMMAND: 'echo "test"'
as the command and check. This will help us to find out if there is any specific issue with the command that you are using in the Pipe
3. Please run
'cd /var/www/gcs-backend && sudo git pull origin stage && sudo npm i && sudo pm2 restart index'
directly on the SSH server (outside the Pipeline) and see what you observe
Looking forward to hearing from you.
Kind regards,
Caroline
Hi @Caroline R ,
thank you so much for replying to my problem.
i added the suggested edits, ran the command on the server
'cd /var/www/gcs-backend && sudo git pull origin stage && sudo npm i && sudo pm2 restart index'
it asked for my password, i entered it then everything went well with no problem, actually it didn`t take more than a minute to do everything.
However, i`m still facing the same problem.
points to mention:
- i added $SERVER and $SSH_USER to the repo variables.
- i also generated ssh key pairs, added the public key to the server authorized_keys and added the host address to the know hosts.
also here`s my full output:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @ali sakr alaraby!
Thanks for the additional information. I can see you are using a very old version of Pipe (0.2.3), so could you please:
0.4.0
and check with that; echo test.
Please let me know how it goes and feel free to add any additional information here.
Thank you.
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Caroline R ,
thank you again for getting back at me with some hints.
now after some further investigation and playing around with the COMMAND part i found out that all commands run well except for 'sudo git pull origin stage', seems like git commands are the ones that don`t work.
i provide the $SSH_USER and $SERVER variables and i`m sure they`re correct, also i`m using the ssh key pairs correct, i generated them from the bitbucket ssh_keys settings page and i added the public key to the server`s authorized_keys as in the document i was following.
using this command 'sudo git pull origin stage' on the server of course asks for my credentials, i provide it when asked then it continues fine.
so do you have any recommendations for me of what could i be missing?
and thank you so much again.
Ali Alaraby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @ali sakr alaraby,
Could you please confirm if the credentials you provide are for the sudo or the git command?
Also, could you check which protocol you are using on Git operations, SSH or HTTPS? You can verify that by running the following command in the directory where data is being pulled (cd /var/www/gcs-backend && sudo git remote -v):
git remote -v
Looking forward to hearing from you.
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.