Git和GitHub連線後無法推送的問題

2021-08-01 16:17:20 字數 522 閱讀 4598

昨天在用git和github連線上後,想用 git push -u origin master時,總是提示ssh:connect to host github.com port: connection time out錯誤,在google查資料時有很多人說在.ssh檔案下寫乙個config檔案來改訪問的埠為443,但是問題依舊無法解決。

在自習閱讀了github的一些說明後,我將git和github的連線命令從$ git remote add origin [email protected]:michaelliao/learngit.git改為

git remote add origin 後連線上git和github,就可以向github遠端倉庫推送啦~~

下面附上github的說明

原因:git是支援https和ssh協議的,但有些公司的網路是只開放https協議的,所以無法用ssh,但是https相較於ssh要慢一些。

本地git倉庫關聯github倉庫後無法push

在github上新建乙個倉庫後有以下指導 or create a new repository on the command line echo learn git readme.md git init git add readme.md git commit m first commit git ...

配置Git連線GitHub

本地建立ssh key ssh keygen t rsa c your email youremail.com 後面的your email youremail.com改為你在github上註冊的郵箱,之後會要求確認路徑和輸入密碼,我們這使用預設的一路回車就行。成功的話會在 下生成.ss 件夾 通過g...

github連線本地git

1.選好本地倉庫的目錄,進去右鍵 git bash,如圖 git init3.為了把本地的倉庫傳到github,還需要配置ssh key,在本地建立ssh key ssh keygen t rsa c your email email.com 回車會讓你輸入存放儲存ssh key的位址,它給了乙個預...