lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Unable to access submodule config file error

Open prihex opened this issue 3 years ago • 13 comments

Describe the bug When I enter a submodule I get the following error 14 times at the top of right area for one submodule which I could not enter

To Reproduce Steps to reproduce the behavior:

  1. $lazygit <repo_name>
  2. Enter a submodule
  3. See permission denied error at right area

Expected behavior Do not see any error at right area

Screenshots Screenshot from 2022-09-02 14-20-03 Screenshot from 2022-09-02 14-20-30

Version info: lazygit version: commit=, build date=2021-04-11, build source=debian, version=0.27.4, os=linux, arch=amd64 git version : 2.25.1

prihex avatar Sep 02 '22 11:09 prihex

Please fill out the bug report template.

Are you able to enter the submodule through the cli, do you have sufficient permissions?

mark2185 avatar Sep 02 '22 11:09 mark2185

I updated the issue description according to bug report template.

How can i enter the submodule through the terminal. By cd submodule_location or any other specific command? I was generally using vscode for version controlling.

If it is only about changing directory, there is no problem. Everything is okay

prihex avatar Sep 02 '22 15:09 prihex

Please note the note at the bottom of the report:

**Note:** please try updating to the latest version or [manually building](https://github.com/jesseduffield/lazygit/#manual) the latest `master` to see if the issue still occurs.

Your version (0.27.4) is 1 year and 5 months old. It's likely the bug was solved in the meantime.

mark2185 avatar Sep 02 '22 16:09 mark2185

commit=367b0d331836c90c015bf0c45f88612f3d94d08a, build date=2022-07-20T09:27:56Z, build source=binaryRelease, version=0.35, os=linux, arch=amd64

Still getting the error

prihex avatar Sep 02 '22 18:09 prihex

Alright, can you run git status in the submodule without problems?

Do the permissions match to the parent repo? (ls -l will list the permissions)

Does it work if you clone the repository once again, somewhere else? Just a git clone --recursive <link> some-other-name should suffice.

mark2185 avatar Sep 02 '22 18:09 mark2185

  • There is no problem at git status
  • Permissions are the same as other submodules
  • I get the same error in my another project repository that includes submodules

prihex avatar Sep 02 '22 18:09 prihex

Do you by any chance use an old ssh key? Something similar on SO

mark2185 avatar Sep 03 '22 06:09 mark2185

git submodule update --init --recursive works well for me. I can also push and fetch without any problem. Any ssh issue would couse such problems. I also check specified config file owner and read permissions. It seems ok

-rw-rw-r-- 1 prihex prihex 765 Eyl 6 14:18 config

prihex avatar Sep 06 '22 12:09 prihex

I tried cloning a public widespread github repo. Same result

git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot/
git submodule update --init --recursive
lazygit
  • Then go to submodules.
  • Select modules/uavcan which is the first
  • Go to local branches main

image

prihex avatar Sep 07 '22 19:09 prihex

Are the submodules also cloned over https?

Check the .gitmodules file in the root of the repo, it should start with this:

[submodule "modules/uavcan"]
	path = modules/uavcan
	url = https://github.com/DroneCAN/libuavcan.git

mark2185 avatar Sep 07 '22 20:09 mark2185

Yes. All protocols are https.

prihex@pc:~/projects/test/ardupilot$ cat .gitmodules 
[submodule "modules/uavcan"]
	path = modules/uavcan
	url = https://github.com/DroneCAN/libuavcan.git
[submodule "modules/waf"]
	path = modules/waf
	url = https://github.com/ArduPilot/waf.git
[submodule "modules/gbenchmark"]
	path = modules/gbenchmark
	url = https://github.com/google/benchmark.git
[submodule "modules/mavlink"]
	path = modules/mavlink
	url = https://github.com/ArduPilot/mavlink
[submodule "gtest"]
	path = modules/gtest
	url = https://github.com/ArduPilot/googletest
[submodule "modules/ChibiOS"]
	path = modules/ChibiOS
	url = https://github.com/ArduPilot/ChibiOS.git
[submodule "modules/gsoap"]
	path = modules/gsoap
	url = https://github.com/ArduPilot/gsoap
[submodule "modules/DroneCAN/DSDL"]
	path = modules/DroneCAN/DSDL
	url = https://github.com/DroneCAN/DSDL.git
[submodule "modules/CrashDebug"]
	path = modules/CrashDebug
	url = https://github.com/ardupilot/CrashDebug
[submodule "modules/DroneCAN/pydronecan"]
	path = modules/DroneCAN/pydronecan
	url = https://github.com/DroneCAN/pydronecan
[submodule "modules/DroneCAN/dronecan_dsdlc"]
	path = modules/DroneCAN/dronecan_dsdlc
	url = https://github.com/DroneCAN/dronecan_dsdlc
[submodule "modules/DroneCAN/libcanard"]
	path = modules/DroneCAN/libcanard
	url = https://github.com/DroneCAN/libcanard

prihex avatar Sep 08 '22 09:09 prihex

Any progress?

prihex avatar Sep 22 '22 15:09 prihex

Sadly no, since it's unfortunately not reproducible. At least I can't reproduce it.

Unless you're willing to debug, I'm afraid we can't do much at this point :confused:

mark2185 avatar Sep 22 '22 15:09 mark2185