Git push asking for username and password

Von in linux, netzthetik

I fidd­led around with this issue for a vast amount of time. I bur­ro­wed into panels. I bla­med my Ubun­tu instal­la­ti­on for a bro­ken gno­me key­ring. I instal­led SSH keys ump­te­en times. Not­hing came of it. Each time I pushed the last git com­mit to Git­Hub from wit­hin the con­so­le, git asked for aut­ho­ri­za­ti­on.
Then one day acci­dent­al­ly I came across the con­fi­gu­ra­ti­on file of git loca­ted at .git/​config and a line star­ting with https://… attrac­ted my atten­ti­on.
No sur­pri­se. For­cing git to con­nect to Git­Hub via HTTPS the con­so­le is unab­le to use instal­led SSH keys. For­tu­n­a­te­ly resol­ving the issue is easy. Git­Hub is offe­ring three links to a repo­sito­ry: HTTPS, SSH and Sub­ver­si­on. Just copy the SSH link to the con­fi­gu­ra­ti­on file and replace the HTTPS URL. If you don’t want to mess around with the con­fi­gu­ra­ti­on just exe­cu­te the fol­lo­wing com­mand at the root loca­ti­on of your pro­ject:

user@pc:/my/project/$ git remote set-url origin

… whe­re would be the link obtai­ned from Git­Hub.
And the next git push will run through like a charm.