No access to new repository with active ssh key on profile #22409
-
Hey all - just joining this group. I am on Endeavour OS (Arch based) and using github for a while to contribute to existing projects. Using the terminal for all git tasks… I am now in trouble again since the access to github is only available with access token or ssh key. When i created a new repository I cannot push to it - somehow the ssh key in my github profile is only recognized for existing repositories. I could yet again create another ssh key but there must be a smarter solution. Couldnt find any help yet in documentation or forum so asking here… What I have done:
now it doesn’t ask for the passphrase for the ssh key but instead for git username and password which doesnt work since summer
On my other own or cloned repositories I can push using the ssh key |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Anyone, who can explain what I missed? Thx. |
Beta Was this translation helpful? Give feedback.
-
toszlanyi:
Your repository is configured with an HTTPS remote URL, not SSH, that’s why it’s not using your SSH key. You can change the URL to SSH like this:
For future reference, when you click the green “Code” button on the repository page you can select the protocol you want to use in the box that comes up to get the right URL. |
Beta Was this translation helpful? Give feedback.
-
Wicked! Thanks for pointing into the right direction. Your line only changes the fetch url though. But with option
|
Beta Was this translation helpful? Give feedback.
-
Peculiar, in my experience it changes both unless you use one of the flags. I wonder if behavior changed between versions? |
Beta Was this translation helpful? Give feedback.
Wicked! Thanks for pointing into the right direction. Your line only changes the fetch url though. But with option
--push
it also changes the other url.