I would like to run git commands from my container to the host. The git folder I'm updating lives on the host machine and I'm unable to clone it in my container. I would also prefer to have the files in my host machine so users don't have a hard time uploading files.
- Host
- DockerContainer 1
Things I tried:
ssh -i /var/sshkeys Username@vmMaching.Domain.corp 'cd /var/www/scheduledqueries && git pull'
I got an error upon entering my code:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0755 for '/var/sshkeys' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/var/sshkeys": bad permissions
Username@vmMaching.Domain.corp's password:
Permission denied, please try again.
Username@vmMaching.Domain.corp's password:
error: cannot open .git/FETCH_HEAD: Permission denied
root@200eea99abd9:/#
I copied my cert and keys files to a location and listed it in the volume section of my docker-compose