Is it possible to enter my git username and password into a config somewhere so I don't have to enter it so many times? I think during this upgrade I have entered it 20 times...
Upgrade Script Git save username and password
I believe you can enter your username and password as part of the Git URL to use the HTTP authentication, in the main.conf:
'git' => Array( 'location' => 'https://username:password@github.com/squizlabs/Matrix.git' ),
I am talking about when running the upgrade scripts. It will prompt you for your git username and password when it is checking out the various versions.
yeah, I mean can't you use the git@github.com url instead of the https url? or is there some restriction I am missing?
alternatively, if you have using git 1.7.9 or higher, you should be able to use:
git config --global credential.helper osxkeychain|gnome-keyring
Depending on the OS you use, OSX use osxkeychain and Linux use gnome-keyring... should be much safer than leaving a password in a file ;)
Another alternate method is to “git clone” a local copy of the repository, then point “location” in the upgrade script’s main.conf to it.
We tend to do that when upgrading systems where we may not have external access to git - in those cases, it’s much easier and better than the old “pre_uploaded” method was.
yeah, I mean can't you use the git@github.com url instead of the https url? or is there some restriction I am missing?
I have no idea. That is why I am asking you guys. :)
I think you should be able to:
Add your public key to your profile under gitlab (Edit profile -> Add SSH keys), uncomment the git path (and change if needed) in main.conf and try changing the url from https://gitlab.squiz.net/Labs/Matrix.gitto git@gitlab.squiz.net:Labs/Matrix.git
If that doesn't work, then maybe there is some other restriction in place to stop that.
None of these solutions ever seemed to help. Doing an upgrade again and having to enter my credentials 50 times sucks.
Just curious, Nic - did you try taking a repo clone and repointing “location” in main.conf to it? That always worked well for me when I was in a situation where git access was problematic.
First “git clone” the Matrix repo.
Then edit the automatic upgrade script’s main.conf file and change “location” to point to the location of your local git clone.
Then just run the upgrade script normally - it’ll pull everything from your local clone instead of connecting to the remote Git server.
We use that method when upgrading on clients’ networks where no connection to Git is available.