rj487
rj487

Reputation: 4634

git ssh doesn't work

I have done what the document said, and when I type ssh -T [email protected], it will show

Warning: Permanently added the RSA host key for IP address '[192.30.252.149]:443
' to the list of known hosts.
Hi fifiteen82726! You've successfully authenticated, but GitHub does not provide
 shell access.

However, when I want to push something to github, it still require my username and password. Why?

Update

Here is my .git/config

[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
        hideDotFiles = dotGitOnly
[remote "origin"]
        url = https://github.com/fifiteen82726/MFA.git
        fetch = +refs/heads/*:refs/remotes/origin/*

Upvotes: 2

Views: 335

Answers (1)

nkdm
nkdm

Reputation: 1240

You are using HTTPS protocol instead of SSH.

Change url of the repository to [email protected]:fifiteen82726/MFA.git

Ex. command git remote set-url origin [email protected]:fifiteen82726/MFA.git

Here's the GitHub help page describing how to get addresses for different protocols https://help.github.com/articles/which-remote-url-should-i-use/

Upvotes: 8

Related Questions