Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy not show '/bin/bash: line 94: /root/.: Is a directory' in .init_ssh #37

Closed
youyi1314 opened this issue Sep 27, 2019 · 3 comments
Closed

Comments

@youyi1314
Copy link

I already set variable at CI / CD Setting
image

My Config:

.init_ssh: &init_ssh |
eval $(ssh-agent -s)
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh
[[ -f /.dockerenv ]] && echo -e "Host \n\tStrictHostKeyChecking no\n\n" > ~/.
.change_file_permissions: &change_file_permissions |
find . -type f -not -path "./vendor/
" -exec chmod 664 {} ;
find . -type d -not -path "./vendor/*" -exec chmod 775 {} ;
chmod 777 -R storage;

stages:

  • deploying

cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"

staging:
stage: deploying
image: lorisleiva/laravel-docker:latest

Pseudocode describing roughly what we're trying to achive

script:
- *init_ssh
- *change_file_permissions
- php artisan deploy 1.2.3.4 -s=upload

But i got this error. why it go to /root/. where can i find this code on?
image

@lorisleiva
Copy link
Owner

Hi there 👋

I have no idea but I think this is more a debug question that you should ask on StackOverflow or other forums.

Please reopen if you find a bug that you can reproduce on Laravel Docker.

@youyi1314
Copy link
Author

Closed
I found the problem here
image
for the small screen, it shows only
[[ -f /.dockerenv ]] && echo -e "Host \n\tStrictHostKeyChecking no\n\n" > ~/.
the actual one is # after scroll to right
image

@lorisleiva
Copy link
Owner

Haha okay no prob. Thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants