authenticationgithubgitlabrepository

GitLab issue with pushing to repo


So, I am having an issue all of a sudden with my gitlab repo. I can't push the newly created files to my github repo. I am getting a permission denied

Permission denied (publickey). fatal: Could not read from remote repository.Please make sure you have the correct access rights

I have created the SSH key using my student information, I've checked the config file to ensure that it is sending the request to the correct repository.

Funny thing is is that i was able to push my first set of changes to the repository, but now I can't. I've ensured that I have the appropriate permissions in gitlab as well. It also rejects the ssh -T (repo name)

I'm stumped at this point.

Any assistance would be nice. I can any information that would help solve this.


Solution

  • Figured it out. For anyone that might run into the same issue. I believe you have to start you ssh client and attach the key each time the SSH client is shut down.

    eval "$(ssh-agent -s)"
    

    followed by:

    ssh-add ~/.ssh/(keyname)
    

    where key name is the name of the rsa file that you created.

    Sadly, I did this earlier this morning, and tried again just now and it worked...