[SOLVED] Too hard to push to GIThub

Need help getting your computer to behave? Need help installing or running FG? Need help compiling? This is your first place to start!
Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

[SOLVED] Too hard to push to GIThub

Postby Octal450 » Wed Jun 08, 2016 3:10 pm

Hi, I sometimes need to push alot of bulk updates, and its too hard. I have to do:

git add .

git commit -m "blablabla"

git push origin master

type username

type password

git push origin2 master

type username

type password


Way to long for each plane! Especially since my password is longer than 30 characters. I have to update sometimes 6 or 7 at once. Not all have an origin2, but most do. Can I get rid of the passwords, and have Git remember them like gitlab uses?
Last edited by Octal450 on Sat Jun 11, 2016 1:49 am, edited 1 time in total.

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: To hard to push to GIThub

Postby IAHM-COL » Wed Jun 08, 2016 3:13 pm

https://help.github.com/articles/genera ... ssh-agent/

Get a ssh key. Upload the pubkey to github

https://help.github.com/articles/adding ... b-account/

And clone using ssh, instead of https:

Then you don't need to type passwords to push
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

Re: To hard to push to GIThub

Postby Octal450 » Wed Jun 08, 2016 4:21 pm

OK, and how do I clone with ssh?

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: To hard to push to GIThub

Postby IAHM-COL » Wed Jun 08, 2016 4:30 pm

Image

Click on "USE SSH" for the proper url

then, example

1. you had not cloned yet

Code: Select all

git clone git@github.com:FGMEMBERS/GulfstreamG550.git

Notice above how git@ is used instead of http://

2. you already cloned

Code: Select all

git remote -v

Response will show you origin pointing to a http:// url

example

Code: Select all

git remote remove origin
git remote add orgin git@github.com:FGMEMBERS/GulfstreamG550.git
git remote -v

Response will show you your origin now points to a ssh git@ url
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

OPFOR77
Posts: 208
Joined: Wed Apr 27, 2016 7:30 pm

Re: To hard to push to GIThub

Postby OPFOR77 » Wed Jun 08, 2016 4:53 pm

Instead of SSH...

You can use

Code: Select all

git config --global credential.helper "cache --timeout=3600"


And you won't have to retype your password for an hour. This is what I use on linux.

Or you can use the netrc file. See this link. Would be different instructions if not on Windows.
OPRF Fighter Jock and Dev

Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

Re: To hard to push to GIThub

Postby Octal450 » Wed Jun 08, 2016 6:32 pm

Thx, won't have to reclone that way, let me try. I used 36000, to make the time longer ;)

Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

Re: To hard to push to GIThub

Postby Octal450 » Wed Jun 08, 2016 9:11 pm

git: 'credential-cache' is not a git command. See 'git --help'.

Not working

OPFOR77
Posts: 208
Joined: Wed Apr 27, 2016 7:30 pm

Re: To hard to push to GIThub

Postby OPFOR77 » Wed Jun 08, 2016 11:00 pm

Try typing it again. That error tells me you entered the wrong command.

For other techniques, see: https://git-scm.com/docs/git-credential-store
OPRF Fighter Jock and Dev

Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

Re: [SOLVED] Too hard to push to GIThub

Postby Octal450 » Sun Jun 12, 2016 9:29 pm

that never ended up working, Israel and I switched to SSH.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 5 guests