Git Push Error - Could not resolve host name

后端 未结 4 555
迷失自我
迷失自我 2021-02-05 06:22
nshastri@N-SHASTRI ~/datasciencecoursera (master)
$ git push origin master

ssh: Could not resolve hostname https: no address associated

4条回答
  •  北海茫月
    2021-02-05 07:05

    Simply type:

    git remote -v
    

    and double-check the url associated with origin for your upstream repo.

    Once you have the right url, update your remote origin with another git remote command:

    git remote set-url origin /the/right/url
    

    In your case, the url is wrong:

    https:/github.com/nkshastri/datasciencecoursera.git
    # instead of:
    https://github.com/nkshastri/datasciencecoursera.git
         ^^^^
    

    Simply type:

    git remote set-url origin https://nkshastri@github.com/nkshastri/datasciencecoursera
    

    Then try again:

    git push -u origin master
    

    (with master, not maaster)

提交回复
热议问题