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

using @reboot with crontab #258

Open
Seridyan opened this issue Dec 3, 2020 · 1 comment
Open

using @reboot with crontab #258

Seridyan opened this issue Dec 3, 2020 · 1 comment

Comments

@Seridyan
Copy link

Seridyan commented Dec 3, 2020

When I use crontab to start GAD at reboot, I can't connect to the Gitlab repository. If I manually start GAD in the terminal, everything works as it should. I am using a raspberry pi 3 model A+. Here is the log output:

2020-12-03 11:38:57,765 [INFO ] Initializing repository "my repository"
2020-12-03 11:38:58,542 [INFO ] ssh: connect to host x.x.x.x port 22: Network is unreachable
2020-12-03 11:38:58,543 [INFO ] fatal: Could not read from remote repository.
2020-12-03 11:38:58,544 [INFO ]
2020-12-03 11:38:58,544 [INFO ] Please make sure you have the correct access rights
2020-12-03 11:38:58,544 [INFO ] and the repository exists.
2020-12-03 11:38:58,545 [ERROR] Command 'git fetch origin' failed with exit code 128
2020-12-03 11:38:58,545 [ERROR] Unable to init repository "my repository"
2020-12-03 11:38:59,489 [CRITI] Unable to activate SSL: File does not exist: /home/pi/cert.pem
2020-12-03 11:38:59,537 [CRITI] Unable to start HTTP server: [Errno 99] Cannot assign requested address

@Seridyan
Copy link
Author

Seridyan commented Dec 3, 2020

The solution to my problem was to add a delay before executing GAD in a script and then call the script in crontab.

sleep 10
python -m gitautodeploy --daemon-mode --config config.json

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

1 participant