2016-10-29 21 views
0

私はgitで設定されたプロジェクトを持っています。私はonedriveでリポジトリを作成しようとしていますが、作成されたリポジトリを認識することはできません。git remote onedriveが認識されません

私はonedriveでフォルダを作成し、元の原点を削除して新しいフォルダを追加しました。私はそれをクエリしたり、何らかのアクション(プッシュなど)を実行しようとすると、「リモートリポジトリから読み取れません」というエラーが表示されるまでうまくいく。コードを見てください。

奇妙なことに、gitは非常にうれしくリモートを作成しますが、それにアクセスできないということです。ここ

はプロセスであり、コード

PS E:\ToolTrakka V7_git\tt> md C:\users\rgudgeon.RGA\OneDrive\Development\tooltrakka_v7_repo.git 


Directory: C:\users\rgudgeon.RGA\OneDrive\Development 


Mode    LastWriteTime   Length Name                     
----    -------------   ------ ----                     
d-----  30-Oct-16 10:08 AM     tooltrakka_v7_repo.git                



PS E:\ToolTrakka V7_git\tt> cd C:\users\rgudgeon.RGA\OneDrive\Development\tooltrakka_v7_repo.git 

PS C:\users\rgudgeon.RGA\OneDrive\Development\tooltrakka_v7_repo.git> git init --bare 
Initialized empty Git repository in C:/Users/rgudgeon.RGA/OneDrive/Development/tooltrakka_v7_repo.git/ 

PS C:\users\rgudgeon.RGA\OneDrive\Development\tooltrakka_v7_repo.git> cd "E:\ToolTrakka V7_git\tt" 

PS E:\ToolTrakka V7_git\tt> git remote 


PS E:\ToolTrakka V7_git\tt> git remote add origin file:\\\C:\users\rgudgeon.RGA\OneDrive\Development\tooltrakka_v7_repo.git 

PS E:\ToolTrakka V7_git\tt> git remote 
origin 

E:\ToolTrakka V7_git\tt> git remote show origin 
git : ssh: Could not resolve hostname file: Name or service not known 
At line:1 char:1 
+ git remote show origin 
+ ~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : NotSpecified: (ssh: Could not ...rvice not known:String) [], RemoteException 
    + FullyQualifiedErrorId : NativeCommandError 

fatal: Could not read from remote repository. 
Please make sure you have the correct access rights 
and the repository exists. 

PS E:\ToolTrakka V7_git\tt> 

PS E:\ToolTrakka V7_git\tt> git push -u origin master 
git : ssh: Could not resolve hostname file: Name or service not known 
At line:1 char:1 
+ git push -u origin master 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~ 
+ CategoryInfo   : NotSpecified: (ssh: Could not ...rvice not known:String) [], RemoteException 
+ FullyQualifiedErrorId : NativeCommandError 

fatal: Could not read from remote repository. 
Please make sure you have the correct access rights 
and the repository exists. 

は、誰もがこの再任意のアイデアを持っていますか?

よろしくレイ

答えて

1

まず、git remote add name urlだけで設定をgitのために(name, url)ペアを追加して、何の検証はありません。したがって、あなたがgit remote addに与えるものは、いつも遠慮なくリモートを作成します。

次に、ssh: Could not resolve hostname file: Name or service not knownは、gitがあなたの起源をsshプロトコルとみなしていることを示しています。 file:\\\file:///に変更してみてください。

+0

ありがとうございました。ときどきそれをトリックするのが最も簡単なことです。 – user3247506

関連する問題