After creating a bash script to pull updates, it is unable to do so, giving me the error in the title. I use the same username I enter manually (which works, just not in the script).
Here is the script I'm using:
#!/bin/bash
# Pulls from remote repo and implements changes
su - rails -c "cd /var/www/myapp/code;
git pull;
expect \"sername for 'https://bitbucket.org':\";
send \"Morganja95\";
interact;
expect \"assword for 'https://Morganja95@bitbucket.org':\";
send \"password\";
interact" # Now that the final command's ran,
# we'll auto - exit the subshell
cd /var/www/myapp/code
RAILS_ENV=production bundle exec rake assets:clobber
RAILS_ENV=production bundle exec rake assets:precompile
nginx -t && sudo nginx -s reload
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.