I would like to create a very simple shell script that will eventually be called by another application that updates the local git repository:
#!/bin/bash
cd $1
sudo git pull
When doing this, I am prompted for credentials (I exit the private BitBucket repository).
Is it possible (briefly) to store credentials in environment variables?
#!/bin/bash
export GIT_USERNAME=<user>
export GIT_PASSWORD=<pass>
cd $1
sudo git pull
The above does not work. Something? I could programmatically change the source url, but that seems a bit excellent.
source
share