user24793
user24793

Reputation: 344

How to connect website to repo using git without typing un and pw

I have a website on a hosting server. I cloned it from my git repo. I can fetch and get the code to come over, however, How can I set up the website folder so that when I fetch or pull I do not have to type sudo or a username and password.

I am sure there is an answer out there and instructions but I do not know the right question to ask and everything comes back as setting up a git server.

I truly do not know and do not have anyone to ask. I will need a dumbed down version to get me started or link to directions. I am not as familiar with ssh protocols for using git and the server. What I have on another site was already created and I do not understand what exactly needs to be accomplished. I have found many things but they get very confusing and do not connect the pieces to what I am trying to do.

Upvotes: 1

Views: 36

Answers (1)

Daniel Burgner
Daniel Burgner

Reputation: 224

You can do this through ssh, if you're working with Linux/Mac

 cd ~               # home directory
 ssh-keygen -t rsa  # Press enter for all values

Then you go to GitHub and add your SSH key by going into "Settings" and click "Add SSH Key."

For Windows, do the following:

  1. Use PuttyGen to generate a key
  2. Export key as an open SSH Key
  3. Go onto GitHub and add your SSH Key as above.

Upvotes: 1

Related Questions