Pergunta

everytime i try to push , its telling me that i cant push to git://github.com/somegitrepo.git

it tells me to use https://github.com/somegitrepo.git , and it will work only if i type git push https://github.com/somegitrepo.git everytime i push

my remote -v shows my origins for push and fetch as

git://github.com/somegitrepo.git

How do i go about fixing this?

Thanks

Foi útil?

Solução

git remote set-url origin "https://github.com/somegitrepo.git" will change address of origin.

Problem with using git:// version may be caused by badly configured (or just lacking) SSH keys.

Outras dicas

  1. delete any existing ssh key (/.ssh/id_rsa).
  2. ssh-keygen -t rsa -b 4096 -C "your_email@example.com" #generation of new ssh key Email github wali.
  3. after ssh key generation.
  4. eval $(ssh-agent -s) To start ssh agent
  5. ssh-add ~/.ssh/id_rsa
  6. clip < ~/.ssh/id_rsa.pub
  7. paste this into the ssh key section of github.

Now pushing git

  1. git init
  2. git add .
  3. git commit -m ""
  4. git status To check for the files.
  5. git remote add origin "url of the repo" This step only for the first time.
  6. git push -u origin master This is used for the initial push. Otherwise use git push.

If still not working---- go to credential manager then windows credential and delete personel access token of github.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top