Erste Begehung: "fatal: could not create führenden Verzeichnisse ..."
Ich versuche, um den ersten zu Begehen, um ein git-repository auf GitHub für ein Unity Projekt. Ich folgte zusammen mit diese Anleitung zu bekommen, wo ich bin. Hinweis: Für einige oder anderen Grund, ich konnte nicht festgelegt Unity-Asset-Serialisierung-Modus zu Zwingen, den Text, also ließ ich mich auf Gemischt (was ich glaube, dass sollte funktionieren).
Mir beim Aufruf von git clone --bare . , Bekomme ich eine Fehlermeldung.
Beachten Sie, dass ich bin nicht der Ersteller des repository und nur ein Beitrag (obwohl ich den ersten commit).
Hier ist alles, was in meinem terminal (ich verwende Git-Bash):
Welcome to Git (version 1.8.4-preview20130916)
Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
Cheddar@CHEDDAR-PC ~
$ cd Documents/ICS168Swarch/
Cheddar@CHEDDAR-PC ~/Documents/ICS168Swarch
$ git init
Initialized empty Git repository in c:/Users/Cheddar/Documents/ICS168Swarch/.git
/
Cheddar@CHEDDAR-PC ~/Documents/ICS168Swarch (master)
$ git add .
warning: LF will be replaced by CRLF in Assets/Prefabs.meta.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Prefabs/Pellet.prefab.meta.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Prefabs/PelletManager.prefab.meta
.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Prefabs/Player.prefab.meta.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Scene1.unity.meta.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Scripts.meta.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Scripts/EatPellets.cs.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Scripts/EatPellets.cs.meta.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Scripts/Movement.cs.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Scripts/Movement.cs.meta.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Scripts/SpawnPellets.cs.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Assets/Scripts/SpawnPellets.cs.meta.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Library/ScriptAssemblies/CompilationComp
leted.txt.
The file will have its original line endings in your working directory.
error: open("Temp/UnityLockfile"): Permission denied
error: unable to index file Temp/UnityLockfile
fatal: adding files failed
Cheddar@CHEDDAR-PC ~/Documents/ICS168Swarch (master)
$ git commit -m "[Initial project setup]"
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore.txt
# Assembly-CSharp-vs.csproj
# Assembly-CSharp.csproj
# Assembly-CSharp.pidb
# Assets/
# ICS168Swarch-csharp.sln
# ICS168Swarch.sln
# ICS168Swarch.userprefs
# Library/
# ProjectSettings/
# Temp/
nothing added to commit but untracked files present (use "git add" to track)
Cheddar@CHEDDAR-PC ~/Documents/ICS168Swarch (master)
$ git clone --bare . https://github.com/zarazha/swarch.git
fatal: could not create leading directories of 'https://github.com/zarazha/swarc
h.git'
Cheddar@CHEDDAR-PC ~/Documents/ICS168Swarch (master)
$
Suchte ich nach Lösungen, aber nichts was ich gefunden schien sich um die gleiche Ursache haben wie das, was ich immer bin. Hilfe zu diesem wird sehr geschätzt!
- zarazha nicht Ihre eigenen github-account, richtig? Aber Sie haben die Berechtigung schreiben swarch-repository?
Du musst angemeldet sein, um einen Kommentar abzugeben.
Sieht es aus, als ob Sie haben hier zwei Probleme.
Zuerst müssen Sie ein
.gitignore
- Datei, die korrekt begrenzt die Dateien, die Sie hinzufügen zu Git. Dies ist im tutorial verlinkt, aber es scheint, Sie haben nicht gefolgt, diese korrekt (wie Ihradd
ist, einschließlich der Dateien, die von derTemp
Ordner). Suchen Ihre Datei-Liste, es scheint, Sie haben nur den Namen dieser Datei.gitignore.txt
durch Zufall. Entfernen Sie die Endung der Datei, und versuchen Sie dann wieder ab (re-run dergit add
) und Sie erhalten bessere Ergebnisse.Sich das problem mit dem
clone
ist, dass Ihre zweite argument (den Pfad"."
) ist falsch. Es ist nicht erforderlich (Standard wäre.
sowieso), und wenn Sie wollen, um es zu spezifizieren, kommt es nach das repository, nicht vor (siehe die Git-docs für details -<repository>
kommt vor<directory>
).So, ich denke, dein Klon sollte stattdessen nur diese:
Ich hatte auch dieses problem einmal auf MacOS. Stellt sich heraus, SourceTree versuchte, den Klon zu meinem /Entwickler/Projekte-Ordner. Dies ist ein Ordner "system" herausstellt. Ich wechselte zu einem anderen Ordner und es funktionierte.
Ich habe den gleichen Fehler. Schließen Sie einfach die Einheit und Sie sind bereit zu gehen