PhasecoreX / docker-red-discordbot

The newest Red-Discordbot in a convenient container
GNU General Public License v3.0
292 stars 36 forks source link

[p]repo add ... - Something went wrong during the cloning process #37

Closed TickTockBent closed 3 years ago

TickTockBent commented 3 years ago

Describe the bug Attempting to add a repo for installation

[p]repo add OB13-Cogs https://github.com/Obi-Wan3/OB13-Cogs "Something went wrong during the cloning process. See logs for more information."

-More Information-

[2021-05-18 19:52:30] [ERROR] red.downloader: Something went wrong whilst cloning https://github.com/Obi-Wan3/OB13-Cogs (to revision: None)
Traceback (most recent call last):
  File "/data/venv/lib/python3.8/site-packages/redbot/cogs/downloader/downloader.py", line 551, in _repo_add
    repo = await self._repo_manager.add_repo(name=name, url=repo_url, branch=branch)
  File "/data/venv/lib/python3.8/site-packages/redbot/cogs/downloader/repo_manager.py", line 1067, in add_repo
    await r.clone()
  File "/data/venv/lib/python3.8/site-packages/redbot/cogs/downloader/repo_manager.py", line 662, in clone
    raise errors.CloningError("Error when running git clone.", git_command)
redbot.cogs.downloader.errors.CloningError: Git command failed: ['git', '-c', 'credential.helper=', '-c', 'core.askpass=', 'clone', '--recurse-submodules', 'https://github.com/Obi-Wan3/OB13-Cogs', '/data/cogs/RepoManager/repos/OB13-Cogs']
Error message: Error when running git clone.

Run command

$ cat docker-compose.yml
version: "3.2"
services:
  redbot:
    container_name: redbot.ttbot
    image: phasecorex/red-discordbot:full
    restart: unless-stopped
    volumes:
      - /mnt/pibots/ttbot:/data
    environment:
      - TZ=America/New_York
      - PUID=1000

Environment info:

processor       : 0
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 108.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 1
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 108.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 2
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 108.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 3
model name      : ARMv7 Processor rev 3 (v7l)
BogoMIPS        : 108.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

Hardware        : BCM2711
Revision        : c03111
Serial          : 10000000d061b77d
Model           : Raspberry Pi 4 Model B Rev 1.1

Additional context /mnt/pibots is an NFS share mounted from a NAS which has the IP whitelisted for r/w access

PhasecoreX commented 3 years ago

Does this happen only with this repo, or all repos you add? Also have you tried restarting the bot and retrying adding this repo? I have run the command exactly as you have above for adding the repo and it works on my bot.

Of note, NFS shares in the past have been an issue for some users.

TickTockBent commented 3 years ago

It happens regardless of the repo, I have attempted it on 3 so far.

I have double checked, the folders in questioned are owned by UID 1000 which the bot is running as. As that user I can manually add/remove folders and files but the logs (which I accidentally left off, my apologies) show:

fatal: Unable to create temporary file '/data/cogs/RepoManager/repos/OB13-Cogs/.git/objects/pack/tmp_pack_XXXXXX': Permission denied
fatal: index-pack failed
 $ docker-compose restart
Restarting redbot.ttbot ... done
[8:16 PM] TickTockBent: !!repo add cbd-cogs https://gitlab.com/CrunchBangDev/cbd-cogs
[8:16 PM] BOT TTBot: You're about to add a 3rd party repository. The creator of Red and its community have no responsibility for any potential damage that the content of 3rd party repositories might cause.

By typing 'I agree' you declare that you have read and fully understand the above message. This message won't be shown again until the next reboot.

You have 30 seconds to reply to this message.
[8:16 PM] TickTockBent: I agree
[8:16 PM] BOT TTBot: Something went wrong during the cloning process. See logs for more information.

Restarted it and re-attempted, still no joy. I'll try it not using the NFS share.

TickTockBent commented 3 years ago

Alright, it does work using local storage on the pi so it appears there is a configuration issue on my end, apologies for taking up your time.