ssh-configを介してgitリポジトリにアクセスする

ssh-configを介してgitリポジトリにアクセスする

cygwinから私のgitリポジトリにプッシュしようとしていますが、役に立ちません。以前は働いていました。わかりました。

$ git push
ssh: Could not resolve hostname prooftheory: Name or service not known
fatal: Could not read from remote repository.

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

これで私のssh-configファイルを読むことができます。

-rwxrwxr--+ 1 user Tartományfelhasználók 230 Dec 10  2015 /cygdrive/c/Users/user/.ssh/config

それは含んでいる

Host phd
    HostName bitbucket.org
    IdentityFile ~/.ssh/id_rsa
    IdentitiesOnly yes
    User git

Host prooftheory
    HostName bitbucket.org
    IdentityFile ~/.ssh/pt_rsa
    IdentitiesOnly yes
    User git

.git/config には次の内容が含まれています。

[remote "origin"]    
        url = ssh://git@prooftheory/gergely_/prooftheory.git
        fetch = +refs/heads/*:refs/remotes/origin/*

bitbucket.orgにpingを送ることができます。 。私がここで何を見逃しているのでしょうか?

編集する

https://serverfault.com/questions/518729/cygwin-ssh-issue-could-not-resolve-hostname-awshost1-hostname-nor-servname-pro

cygwinは他の場所からssh設定情報を取得できると言っていますが、~/.ssh/configを使用するようにgitを設定する方法は不明です。その設定を〜/.ssh/ssh_configにコピーしましたが、役に立ちませんでした。残念ながら、ssh -vvvは読み取る設定ファイルを作成しません。

ベストアンサー1

まず、シンボリックリンクを作成する必要がありました。

/home/user

到着

/cygdrive/c/Users/user

そして下

https://serverfault.com/questions/253313/ssh-hostname-returns-bad-owner-or-permissions-on-ssh-config

何かを作る

chmod 600 ~/.ssh/config

効果がありました。

私はまだ手に入れる

key_load_public: invalid format

エラーが発生しましたが、それでも今は機能します。

おすすめ記事