Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Unable to commit changes - Temp/Unitylockfile error #1039

Closed
jwvanderbeck opened this issue Mar 30, 2019 · 18 comments
Closed

Unable to commit changes - Temp/Unitylockfile error #1039

jwvanderbeck opened this issue Mar 30, 2019 · 18 comments

Comments

@jwvanderbeck
Copy link

Prerequisites

  • Be sure to run with tracing enabled to capture runtime details in the log file
  • Include the log file in the PR.
    • On Windows, the extension log file is at %LOCALAPPDATA%\GitHubUnity\github-unity.log
    • On macOS, the extension log file is at ~/Library/Logs/GitHubUnity/github-unity.log
    • On linux, the extension log file is at ~/.local/share/GitHubUnity/github-unity.log

Description

Unable to commit changes.

Steps to Reproduce

  1. Select files to commit and add description
  2. click commit

Expected behavior:
I expect the changes to be commited

Actual behavior:
After processing, the list of files under changes does not change and nothing is actually commited.

Reproduces how often:
100%

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

GitHub.Unity.ProcessException: error: open("Temp/UnityLockfile"): Permission denied
error: unable to index file Temp/UnityLockfile
@jwvanderbeck
Copy link
Author

This file is not locked by any external process, so it looks like Github Unity is getting in its own way (unless this is a standard Unity file?)

Imgur

@shana
Copy link
Member

shana commented May 21, 2019

This is a standard Unity file, I don't know why you're getting this error, as the Temp folder should not be getting scanned, but I can't tell what's really going on without the full log :/

@shana
Copy link
Member

shana commented May 21, 2019

@jwvanderbeck If you're still around, let me know!

@shana shana closed this as completed May 21, 2019
@BCG-Jackson
Copy link

Find Temp/UnityLockfile in the changed files on the left in Github Desktop.
Right-click -> ignore file

@XanNava
Copy link

XanNava commented Oct 19, 2019

For anyone else having this problem, my solution was to change my .gitignore file to have a wild card before all the unity folders. My git directory was one folder above my unity project(so like "Gitfolder/UnityProject/Temp"), and as it looks like the .gitignore was expecting to be at the same level as the Temp folder(and other folders) it was not excluding the folders. Not sure if this will break anything, if not I would suggest GitHub change their default unity ignore file.

Uhm, also does someone know how to post their gitignore file? I tried code, which as you can see bellow didn't work out well.

`# This .gitignore file should be placed at the root of your Unity project directory

Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore

*/[Ll]ibrary/
*/[Tt]emp/
*/[Oo]bj/
*/[Bb]uild/
*/[Bb]uilds/
*/[Ll]ogs/
*/[Mm]emoryCaptures/

Never ignore Asset meta data

!/[Aa]ssets/**/*.meta

Uncomment this line if you wish to ignore the asset store tools plugin

/[Aa]ssets/AssetStoreTools*

TextMesh Pro files

/[Aa]ssets/TextMeshPro/

Autogenerated Jetbrains Rider plugin

/[Aa]ssets/Plugins/Editor/JetBrains

Visual Studio cache directory

*/.vs/

Gradle cache directory

.gradle/

Autogenerated VS/MD/Consulo solution and project files

*ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db

Unity3D generated meta files

*.pidb.meta
*.pdb.meta
*.mdb.meta

Unity3D generated file on crash reports

*/sysinfo.txt

Builds

*.apk
*.unitypackage

Crashlytics generated file

crashlytics-build.properties

`

@jwvanderbeck
Copy link
Author

@78Star If you'll note the comment at the very top of the file, it is intended to be placed in the root of your Unity project. If you choose to put it somewhere else then yeah it won'r work right an you will need to adjust accordingly. That isn't GitHub's responsibility really.

@vicentselfa
Copy link

vicentselfa commented Apr 1, 2020

Hello.
I solved this problem with the instruction:
echo "Temp/*" >> .gitignore

@dnenov
Copy link

dnenov commented May 3, 2020

For me, closing Unity just to add the objects and commit worked.

@raunak111
Copy link

For me, closing Unity just to add the objects and commit worked.

Yes, this worked for me too :)

@Maghil
Copy link

Maghil commented Jul 10, 2020

@vicentselfa HI, i know temp file are unnecessary but did it cause any unpredictable errors?

@BridgingGames
Copy link

Don't forget to change the .gitignore in the repository folder:

It should have something like this:
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/

Remove the first slashes:
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/
[Mm]emoryCaptures/

@zipzit
Copy link

zipzit commented Jan 30, 2021

For anyone else having this problem, my solution was to change my .gitignore file to have a wild card before all the unity folders. My git directory was one folder above my unity project(so like "Gitfolder/UnityProject/Temp"), and as it looks like the .gitignore was expecting to be at the same level as the Temp folder(and other folders) it was not excluding the folders. Not sure if this will break anything, if not I would suggest GitHub change their default unity ignore file.

Uhm, also does someone know how to post their gitignore file? I tried code, which as you can see bellow didn't work out well.

`# This .gitignore file should be placed at the root of your Unity project directory

@78Star Alexander. I'm liking your explanation of the issue... but I'm way confused by the labeling of the /[Aa]ssets/TextMeshPro/ The rest of the folders in your code have */[Ff]older name, but not the Assets stuff. Huh? Is that intentional or just a miss? This doesn't make sense to me. thanks,

zipzit added a commit to Devilsora/GGJ_2021 that referenced this issue Jan 30, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
See details at github-for-unity/Unity#1039
The git directory was one folder above the unity project(so like "Gitfolder/UnityProject/Temp"), and as it looks like the .gitignore was expecting to be at the same level as the Temp folder(and other folders) it was not excluding the folders.
jdmayer added a commit to jdmayer/AR_Tamagotchi that referenced this issue Feb 27, 2021
@Tonyy18
Copy link

Tonyy18 commented Sep 9, 2021

For me it was about having the unity editor open while adding files to commit.
Closed the editor and it worked fine

@Alifikrii
Copy link

i can solve this problem by just close my unity project do commit again

@jwvanderbeck
Copy link
Author

How are you using Github for Unity without having Unity running?

Clearly closing the editor and using normal Git or another Github tool will work. But this issue was about the Github for Unity tool which is a Git UI inside the Unity editor.

@elvinsadiq
Copy link

Hello. I solved this problem with the instruction: echo "Temp/*" >> .gitignore

Where did you write this?

@shana
Copy link
Member

shana commented Apr 19, 2022

Hello. I solved this problem with the instruction: echo "Temp/*" >> .gitignore

Where did you write this?

@elvinsadiq In the root of your Unity project - the directory that has the Assets/ProjectSettings/Temp folders in it - edit the .gitignore file (or create one there if there isn't one), and add the following line to it:

Temp/

This will make sure your Temp folder is ignored by git.

@AngelHdezRetana
Copy link

I after closing unity, it let me do my commit as @dnenov suggested, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests