Cannot get Git to save my password on Paperspace

I’ve always used the gui version of Github in Windows and never had any issues with having to type my password every time I had to push my commits to my Github repositories. Now that I’m working in Paperspace, I’ve NEVER been able to get the ‘git’ program set up from the command line to always remember my password and not ask for it ever time.

I tried following the instructions here to create a key.

However, I’m unable to follow the instructions to the letter here for adding my key to my Github account, specifically the following line:

clip < ~/.ssh/id_rsa.pub

Obviously, this clips the file to the clipboard, but it only clips it to the Paperspace clipboard which isn’t shared with my local computer’s clipboard. So what I’ve done is tried catting the ~/.ssh/id_rsa.pub file to the terminal and copying and pasting the contents to my Github account’s RSA keys. This is what I’ve tried copying and pasting to my Github’s keys:

And git still asks for my password every time on Paperspace which is quite annoying.

Any idea how to get git on Paperspace to stop asking for my password EVERY time I push? I’ve tried the official instructions to no avail.

Are you sure that you are not using https? what does the following command shows in your repo folder:

git remote -v

If it’s showing something like the following:

origin  https://github.com/USERNAME/REPOSITORY.git (fetch)
origin  https://github.com/USERNAME/REPOSITORY.git (push)

Then you need to change your remote’s URL from HTTPS to SSH with the git remote set-url command

git remote set-url origin git@github.com:USERNAME/REPOSITORY.git

I already changed them to http from https but Github still insists on switching to https and continues to ask for my login and password.

Btw, this is a Private repository. But that’s still no excuse because I’ve been able to update that repository fine via Github Desktop on my Windows machine but when it comes time to update it on Paperspace, I’m left having to type my login and password EVERY TIME!

You should change it from https to ssh, not https to http. Private repo should not be a problem.

1 Like