I'm using terminal for mac and running the line
git push origin master
It asks me for my github.com username and password every time,
is there any way to have it automatically use my credentials?
I keep getting the error
error: The requested URL returned error: 403 while accessing
https://github.com/atheycreek/churchdeploy.git/info/refs
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.com/atheycreek/churchdeploy.git
So I changed it to
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git:github.com/atheycreek/churchdeploy.git
now I get..
kirkstrobeck:churchdeploy kirkstrobeck$ git push origin master
ssh: Could not resolve hostname git: nodename nor servname provided, or not known
fatal: The remote end hung up unexpectedly
I changed it to
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]/atheycreek/churchdeploy.git
and now i get ..
kirkstrobeck:churchdeploy kirkstrobeck$ git push origin master
fatal: '[email protected]/atheycreek/churchdeploy.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
If on OSX, you should be able to use the osxkeychain helper. You can check to see if you already have it installed by typing:
git credential-osxkeychain
If you get a message saying that's not a valid git command, you can install it by doing:
curl -s -O http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain
chmod u+x git-credential-osxkeychain
sudo mv git-credential-osxkeychain `dirname \`which git\``
Then tell git to use it with:
git config --global credential.helper osxkeychain
You will be asked to provide your credentials once more the next time you do a pull/push. From then on, git should remember your info.
From your description of things, it sounds like your [Project Dir]/.git/config file is setup with the line url = https...
, and not url = [email protected]...
. Can you check that file to see what it says? It'd be great if you could post your entire "remote origin" section. It probably looks something like this:
[remote "origin"]
url = https://github.com/atheycreek/churchdeploy.git
fetch = +refs/heads/*:refs/remotes/origin/*
but needs to use ssh instead of http like this:
[remote "origin"]
url = [email protected]:atheycreek/churchdeploy.git
fetch = +refs/heads/*:refs/remotes/origin/*
Setup your ssh keys appropriately with empty passphrase and you need not enter the credentials: http://help.github.com/mac-set-up-git/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With