国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Git提示:ssh: Could not resolve hostname github.com: No address associated with hostname

這篇具有很好參考價(jià)值的文章主要介紹了Git提示:ssh: Could not resolve hostname github.com: No address associated with hostname。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

今天本地Git Push 代碼推送遠(yuǎn)程分支,提示如下錯(cuò)誤信息:

zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace (master)
$ git push
ssh: Could not resolve hostname github.com: No address associated with hostname
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Google 一下,大家的建議是重新配置ssh Key。

重新生成GitHub SSH Key 值,請(qǐng)參考如下指令

zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace (master)
$ git config user.name
zhouzhiwengang

zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace (master)
$ git config user.email
zhouzhiwengang@163.com

zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace (master)
$ ssh-keygen -t rsa -C "zhouzhiwengang@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/zzg/.ssh/id_rsa):
/c/Users/zzg/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/zzg/.ssh/id_rsa
Your public key has been saved in /c/Users/zzg/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:ikXfYyRhWd/897SdPdU+Q/NKTgoZVFm4a4/4qzICidw zhouzhiwengang@163.com
The key's randomart image is:
+---[RSA 3072]----+
|        oo. .+.  |
|       ... ooo   |
|      . . o ..o  |
|     . . =  .  ..|
| . o .. S =  . o*|
|  o Eo . . +o .o@|
|    ...   oo oo**|
|      . o ...=..+|
|       . o.o+.o  |
+----[SHA256]-----+

zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace (master)
$ eval $(ssh-agent -s)
Agent pid 909

zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace (master)
$ ssh-add /c/Users/zzg/.ssh/id_rsa
Identity added: /c/Users/zzg/.ssh/id_rsa (zhouzhiwengang@163.com)

zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace (master)
$ clip < /c/Users/zzg/.ssh/id_rsa.pub

執(zhí)行以上指令完成本機(jī)SSH Key值生成,并將生成的Key 拷貝至Git 賬戶/Setting/SSH key 設(shè)置。

溫馨提示:SSH Key 生成時(shí),會(huì)提示本地已經(jīng)存在是否覆蓋,選擇y,再Enter回車(chē)。

重新嘗試git 代碼推送

zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace (master)
$ ssh -T git@github.com
ssh: Could not resolve hostname github.com: No address associated with hostname

錯(cuò)誤含義:域名解析無(wú)法找到GitHub.

Google 一下,大家的解決辦法時(shí),將GitHub IP地址配置至hosts文件。

解決Github 域名方法問(wèn)題:?

第一步:查詢(xún)Github 真實(shí)IP地址,可以通過(guò)?https://www.ipaddress.com/查詢(xún)。

Git提示:ssh: Could not resolve hostname github.com: No address associated with hostname

Git提示:ssh: Could not resolve hostname github.com: No address associated with hostname?

?第二步:在本機(jī):C:\Windows\System32\drivers\etc\hosts 文件中,添加如下配置:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
140.82.113.4 github.com

至此,我的Git代碼推送恢復(fù)正常。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-471182.html

到了這里,關(guān)于Git提示:ssh: Could not resolve hostname github.com: No address associated with hostname的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • git 遇到 ssh: Could not resolve hostname -: Name or service not known

    git 遇到 ssh: Could not resolve hostname -: Name or service not known

    提示:文章寫(xiě)完后,目錄可以自動(dòng)生成,如何生成可參考右邊的幫助文檔 提示:這里可以添加本文要記錄的大概內(nèi)容: git clone 遇到ssh: Could not resolve hostname -: Name or service not known錯(cuò)誤時(shí),網(wǎng)上其他方法失效可以嘗試一下?。。?! https://blog.csdn.net/yehaocheng520/article/details/1072030

    2024年02月13日
    瀏覽(28)
  • 報(bào)錯(cuò)ssh: Could not resolve hostname

    報(bào)錯(cuò)ssh: Could not resolve hostname

    …按照網(wǎng)上好多教程試了一下: 新建密鑰,添加到gitee,重新測(cè)試。 修改host,加入gitee的ip地址到里面去。 修改.gifconfig配置文件,配置成ssh的倉(cāng)庫(kù)鏈接。 這上面的方法都不行,后面發(fā)現(xiàn)一篇文章:SSH連服務(wù)器時(shí),連接不上,出現(xiàn)以下錯(cuò)誤的原因與解決辦法。 才知道是因?yàn)橐?/p>

    2024年02月06日
    瀏覽(27)
  • ssh: Could not resolve hostname guard.: Name or service not known

    ssh: Could not resolve hostname guard.: Name or service not known

    記錄一下 安裝hbase,正確配置hbase的配置文件后,在hbase/bin目錄下命令**./start-hbase.sh**啟動(dòng)hbase服務(wù) 出現(xiàn)報(bào)錯(cuò)ssh: Could not resolve hostname slave1: Name or service not known lost connet 百度后看了很多解決辦法, 無(wú)非就是防火墻、主機(jī)名+ip在某個(gè)文件有錯(cuò)誤 仔細(xì)排查后,發(fā)現(xiàn)是從教室copy回來(lái)

    2024年02月12日
    瀏覽(28)
  • 【解決問(wèn)題 fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com】

    【解決問(wèn)題 fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com】

    1.發(fā)現(xiàn)vulhub靶場(chǎng)不全,重新下載發(fā)現(xiàn)下這個(gè)問(wèn)題,記錄一下。 2.出現(xiàn)以下報(bào)錯(cuò),如下圖 fatal: unable to access ‘https://github.com/…/.git’: Could not resolve host: github.com 3.只需要在命令行中執(zhí)行 git config --global --unset http.proxy git config --global --unset https.proxy 4.既可解決以上問(wèn)題。

    2024年02月05日
    瀏覽(24)
  • 【Github問(wèn)題解決】解決Github:fatal:unable to access ‘https://github.com/.../.git‘:Could not resolve host:git

    【Github問(wèn)題解決】解決Github:fatal:unable to access ‘https://github.com/.../.git‘:Could not resolve host:git

    在平時(shí)的開(kāi)發(fā)過(guò)程中,我們經(jīng)常需要將本地項(xiàng)目上傳到倉(cāng)庫(kù)進(jìn)行協(xié)作發(fā)布等,Github作為全球最大的社交編程及代碼托管網(wǎng)站是我們最常用的項(xiàng)目托管平臺(tái),通過(guò)Git命令進(jìn)行本地和遠(yuǎn)端的同步是第一步 Git相關(guān)的命令在CSDN等網(wǎng)站上都有詳細(xì)介紹,下面這篇文章介紹的就很細(xì)致,從

    2024年02月08日
    瀏覽(28)
  • fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com解決方法【親測(cè)有效】

    今天在使用Github的時(shí)候突然出現(xiàn)了這樣的報(bào)錯(cuò),云里霧里,看了網(wǎng)上的解決辦法,說(shuō)是代理服務(wù)器的問(wèn)題,嘗試了無(wú)數(shù)遍無(wú)果 然后Ping了一下github網(wǎng)站,發(fā)現(xiàn)Ping不通: 這里考慮應(yīng)該是hosts文件解析的問(wèn)題?? 在hosts文件中加入如下三行: 140.82.112.3 是github網(wǎng)站服務(wù)器的真實(shí)I

    2024年02月12日
    瀏覽(23)
  • 解決ssh: Could not resolve hostname ***: nodename nor servname provided, or not known報(bào)錯(cuò)

    今天新搞到一臺(tái)linux服務(wù)器,使用域名登陸服務(wù)器時(shí)遇到了如下報(bào)錯(cuò): ssh: Could not resolve hostname ***: nodename nor servname provided, or not known 網(wǎng)上有一種說(shuō)法,首次使用ssh命令登陸服務(wù)器時(shí),可以先ping一下這個(gè)地址,讓本地的hosts緩存該地址的名字,再?lài)L試ssh登陸。 事實(shí)證明,這種

    2024年02月07日
    瀏覽(41)
  • 【已解決】ssh: Could not resolve hostname hadoop102: Name or service not knownlost connection

    【已解決】ssh: Could not resolve hostname hadoop102: Name or service not knownlost connection

    在 [root@hadoop101 software] 輸入 # scp -r /usr/java/ hadoop102:/usr/ 出現(xiàn)如圖所示問(wèn)題, ? 搜索資料明白:需要將服務(wù)器hostname與對(duì)應(yīng)的IP地址加到文件名/etc/hosts中,也就是區(qū)分master、slave1、slave2,我這里命名為hadoop101、hadoop102、hadoop103。 解決方法:如圖所示。 ?詳細(xì)做法: 輸入第一個(gè)

    2024年02月11日
    瀏覽(23)
  • master: ssh: Could not resolve hostname master: Name or service not known的解決方法

    master: ssh: Could not resolve hostname master: Name or service not known的解決方法

    第一種解決方法是未修改linux系統(tǒng)中的host文件,這個(gè)在其他人的文章中又闡述,這里就不做介紹。 如果第一種解決方法不能解決,則可以用如下的方法: 如圖,在真機(jī)器的如下的文件路徑中搜索并修改host文件 搜索“命令提示符”,點(diǎn)擊“以管理員權(quán)限運(yùn)行”,再輸入如下圖

    2024年02月04日
    瀏覽(29)
  • Git 拉取代碼提示 unable to access ‘http://xxx.xxx.com/xxx/xxx.git/: Could not resolve host 異常解決

    Git 拉取代碼提示 unable to access ‘http://xxx.xxx.com/xxx/xxx.git/: Could not resolve host 異常解決

    在開(kāi)發(fā)過(guò)程中,會(huì)遇到git拉取提交操作。最近拉取主分支代碼的時(shí)候,提示拉取失敗 提示如下: 出現(xiàn)這個(gè)問(wèn)題,一般是域名對(duì)應(yīng)IP發(fā)生變化,git拉取時(shí)訪問(wèn)不到造成的。 兩種解決方法: 第一種: 本地 host文件 域名對(duì)應(yīng)的IP 替換成新的。 host文件地址:C:WindowsSystem32drivers

    2024年02月05日
    瀏覽(20)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包