1. 程式人生 > >windows 下 Git push 出錯

windows 下 Git push 出錯

錯誤資訊:remote: Permission to ProHiryu/Coursera-test.git denied to forever-cactus.
fatal: unable to access ‘https://[email protected]/ProHiryu/Coursera-test.git/‘: The requested URL returned error: 403

其中ProHiryu是我的使用者名稱。

在網上查了很久,大多就是吧Github上面的英文翻譯了一下,我折騰了一下午,都快要放棄了,在一個英文網站上看到了一個正確回答,就搞定了。

首先這篇文章的前提是,你已經在Windows上正確配置了Git,這個網上有大把教程可以查。

如果這樣還是出現前面所示的錯誤的話,那麼恭喜你和我一樣中招了,接下來我就說下解決辦法:

由於github網站預設支援的是ssh遠端登入協議,所以在你使用者名稱密碼都相同的情況下,必須先在網站上新增你個人的公鑰,但是在實際網路中,未必能夠通過https或者http協議訪問github網站,這個時候你需要開啟local config(就是你要push的git專案中的配置檔案),將其種url=https://[email protected]/derekerdmann/lunch_call.git 修改為 url=ssh://[email protected]/derekerdmann/lunch_call.git,沒錯,就是換了個預設的登入協議,這樣就不會出現上述的permission denied的問題了。

注意將其中使用者名稱都改為自己的。

祝你好運~早日掌握git。

相關推薦

windows Git push 出錯

錯誤資訊:remote: Permission to ProHiryu/Coursera-test.git denied to forever-cactus. fatal: unable to access ‘https://[email prote

WindowsGit使用報錯:warning:LF will be replaced by CRLF in ××××.××

ack 技術 urn span .com arr 初始化 pre rect Windows下Git使用報錯: warning:LF will be replaced by CRLF in ××××.××(文件名) The file will have its o

WindowsGit免密碼

-- PE div AS 文件 創建 技術 git image   Windows下Git在使用http方式的時候clone,pull,push需要輸入用戶名及密碼,通過以下設置可以免密碼   在用戶文件夾創建文件.git-credentials內容如下 https://

windowsgit server搭建

安裝 修改 epo .net 下載 分享圖片 http win 編輯 使用gitblit1.8搭建 首先要安裝JDK 然後下載gitblit,這裏給一個CSDN下載 https://download.csdn.net/download/nietzsche0/10482683

1.windowsGIT 服務安裝

服務器 sof 圖片 mvc 保存 AS 分享 其他 源代碼管理 本章介紹簡單在windows 安裝git 服務方法。服務器端采用的是Bonobo Git Server,一款用ASP.NET MVC開發的Git源代碼管理工具,界面簡潔,基於Web方式配置,簡單易用。客戶端是

WindowsGit使用報錯:warning:LF will be replaced by CRLF in

In 就是 strong add git add 使用 操作 lob -- 出現上面那個警告的原因是:   windows中的換行符為CRLF,而Linux下的換行符為LF(使用Git命令行Git Bash,實際上就是相當於linux環境),所以在執行git add xxx

一、WindowsGit的安裝與配置

lan 版本說明 鎖定 檢出 圖形 客戶 ads 姓名 官方網站 一、下載Git安裝包   1、打開Git的官方網站:https://git-scm.com/   2、找到下載頁:https://git-scm.com/downloads   3、找到Windows版本下載

Windows Git 常用操作記錄

1、windows客戶端安裝 下載地址:http://msysgit.github.io/。 全部預設安裝即可。 安裝完成後,會在系統右鍵選單中整合Git Bash Here等選單選項,說明安裝成功。 2、配置git使用者名稱及郵箱地址 這個就相當於一個使用者的標識資訊,

Windowsgit和碼雲使用實踐

都說github.com賬號是資深程式設計師的標配。奈何國外的網速感人,為了用著方便,可以選國內口碑比較好的gitee.com(碼雲)作為程式碼託管站點。 1.安裝git,設定Path環境變數使得cmd下可以直接用git命令    安裝版本為Git for Wi

windowsgit多賬號配置

在git bash視窗下執行 ssh-keygen -t rsa -C "[email protected]"    注:[email protected]為郵箱地址,此命名在C:\Users\Administrator\.ssh下生成RSA公私鑰(C:

圖解Windows GIT GUI 使用教程

版本 本地 tex lock 倉庫 href d3d hub cat https://jingyan.baidu.com/article/19020a0a7ae6af529c284248.html 本篇經驗將和大家介紹Windows下 GIT GUI 使用教程,

Windowsgit連線GitHub(github.com)、碼市(coding.net)、碼雲(gitee.com)

1、安裝git與註冊 git下載安裝及簡單使用請參考:傳送門 在三個網站分別進行註冊,本人比較懶,使用相同的使用者名稱、郵箱及密碼進行註冊 2、設定公鑰 git生成公鑰鑰,使用如下命令: $ ssh-keygen -t rsa -C "[email&#

windowsgit bash中文亂碼問題解決方法

進入git安裝目錄,通常是C:\Program Files (x86)\Git\ 1. 編輯etc\gitconfig檔案,在檔案末尾增加以下內容: [gui] encoding = utf-8 #程式碼庫統一使用utf-8 [i18n] commitencodin

WindowsGit Bash中文亂碼

文章轉自:http://ideabean.iteye.com/blog/2007367 開啟Git Bash 進入目錄:$ cd /etc 1. 編輯 gitconfig 檔案:$ vi gitconfig       檔案中增加內容 Xml程式碼   [gui]   e

WindowsGit使用報錯:warning:LF will be replaced by CRLF in ××××.××

Windows 下 Git 使用 git add 命令報錯: warning:LF will be replaced by CRLF in ××××.×× The file will have its original line endings in

WindowsGit的用法(一)

時間 and 過程 directory https 倉庫 clean img car 準備: 第一步:下載Git 註意:除非想改變安裝目錄,否則安裝過程一直默認下一步即可。 第二步:新建文件夾,如新建一個 learngit 文件夾 第三步:右鍵 learngit 文件

windowsgit的安裝和使用

git到底是個什麼東西,我這裡就不介紹了,如果大家還有不懂的,可以去百度一下的。我這裡給一個介紹的網址:git簡介        這裡在留一個地址http://baike.baidu.com/subview/1531489/12032478.htm#viewPageCont

WindowsGit 安裝、配置及使用

1、安裝 2、配置 建立SSH 一、引子: 什麼是ssh:ssh是Secure Shell(安全外殼協議)的縮寫,建立在應用層和傳輸層基礎上的安全協議。為了便於訪問github,要生成ssh公鑰,這樣就不用每一次訪問github都要輸入使用者名稱和密碼。 二、生

WindowsGit Bash中VIM開啟檔案中文亂碼

問題如題所示,解決方法是: 步驟一 Administrator@Administrator MINGW64 / $ cd /etc Administrator@Administrator MI

分享 :去掉linux git push時…

在~/下, touch建立檔案 .git-credentials, 用vim編輯此檔案,輸入內容格式: [email protected] ~ $touch .git-credentials [email protected] ~ $vim .git-credentials 在