簡體   English   中英

Windows上的Git SSH訪問

[英]Git ssh access on windows

我已經在Gitlab雲服務器(基於Linux)上建立了一個存儲庫。 我按照基本說明在此處創建了一個新的存儲庫。

git@code.example.com:mike/repo.git

我將存儲庫添加為本地git的遠程目錄

git remote add gitlab git@code.example.com:mike/repo.git

我已經在Windows機器上使用Puttygen生成了一個(pk,sk)密鑰對。 我將它們添加到Users / mike / .ssh中,作為id_rsa遵循以下說明

https://serverfault.com/questions/194567/how-do-i-tell-git-for-windows-where-to-find-my-private-rsa-key

此外,我將公共密鑰添加到Gitlab中存儲庫的DeployKeys下。

不幸的是,當我嘗試(使用Git bash)

git push -u gitlab master

它仍然要求我的git用戶密碼git@code.example.com:mike / repo.git的密碼?

當我嘗試

ssh -v git@code.example.com:mike/repo.git

它與ssh一起返回:無法解析主機名code.example.com:mike/repo.git:沒有與名稱關聯的地址

不清楚我缺少什么。 有什么想法嗎?

干杯,邁克

  1. 轉到用戶個人資料
  2. 單擊左側菜單上的ssh鍵
  3. 添加您的ssh密鑰

添加SSH密鑰

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM