I've setup a global git username and password while logged in as root on my Fedora server with the following commands:git config --global user.email [my email]git config --global user.name [my username]I have also created and saved a public key to my ~/.ssh directory, and added this to the ssh agent with the following command:ssh-add ~/.ssh/[filename]After checking the ssh-agent was running using eval $(ssh-agent -s)I then added the key from ~/.ssh/[filename].pub to the SSH and GPG keys section on github.I have checked in ~/.gitconfig and the username and email are clearly listed there.However, whenever I try to do anything on github it's still prompting me for a username and a password every time. Can anyone tell me what I need to do to fix this issue?
git not using global config file or public key
ssh;git;key authentication;ssh agent;github
You are most probably connecting to https URL of your GitHub repositories. Your url in the .git/config looks somehow like this:url = https://github.com/User/repository.gitIf you want to use ssh authentication, you need to use ssh protocol and therefore url like this:url = git@github.com:User/repository.git