2016-10-29 2 views
0

git에서 설정된 프로젝트가 있습니다. onedrive에서 저장소를 만들려고하지만 repo가 ​​생성되면 저장소를 인식하지 못합니다.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는 유효성 검증이없는, 설정을 이눔하는 (name, url) 쌍을 추가합니다. 따라서 git remote add에 무엇을 주든지간에 항상 행복하게 리모콘을 만듭니다.

둘째, ssh: Could not resolve hostname file: Name or service not known은 git이 출처를 ssh 프로토콜로 간주한다는 것을 보여줍니다. file:\\\file:///으로 변경해보세요.

+0

고마워요. 때로는 가장 쉬운 방법 중 하나입니다. – user3247506

관련 문제