#[SOLVED] git error while trying to clone during post-installation

161 messages Β· Page 1 of 1 (latest)

brittle hazel
#

[SOLVED]

git clone https://github.com/MentalOutlaw/dwm

cloning into dwm ...
remote: Enumerating objects: 65, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (8/8), done.
error: unable to get random bytes for temporary file: No such file or directory
error: unable to get random bytes for temporary file: No such file or directory
error: unable to create temporary files: No such file or direcotry
fatal: failed to write object
fatal: unpack-objects failed

sick tulip
#

did you try the suggestion I provided?

brittle hazel
#

oh no, i just literally booted back here ill let you know if it helped:

git with TMPDIR="/tmp/" git <args>

what do you want me to put in args?

sick tulip
#

clone the same repo you tried to clone

brittle hazel
#

?

sick tulip
#

yes

#

if that fixes it, you need to edit your bash profile with an exported tmpdir

#

did you migrate your home folder from an existing linux install?

brittle hazel
#

no no

#

it is completely fresh new

sick tulip
#

weird, shouldn't happen with a fresh install at all

#

are you trying to use git on a livecd?

#

err, usb I guess these days πŸ˜†

brittle hazel
#

no i im past the usb/dvd point

#

got xorg-server and xorg-xinit

sick tulip
#

you are booted into the system though, right?

brittle hazel
#

yeah

#

i mean im still in tty1

#

via grub

sick tulip
#

then I have no idea why git doesn't have a functional tmpdir

#

just try that command

brittle hazel
#

k

#

git: 'TMPDIR=/tmp/' is not a git command.

#

Replaced git with env even same output

#

@sick tulip no effect

#

Tried cloning my repo:
Fatal: could not read Username for 'https://github.com': No such file or directory

sick tulip
#

to make sure it's not that

#

otherwise I will assume it is a configuration issue

brittle hazel
#

Same thing

#

Im in chroot if this makes a difference

#

Maybe I should recreate the temp file

#

Or dir

sick tulip
#

file?

#

no

#

don't touch it

#

it needs certain permissions

#

what is the output of cat ~/.gitconfig

brittle hazel
#

Protocol
version=1
User
Name=jirafey
Email=(myemail)

sick tulip
#

version=1?

brittle hazel
#

I added that after the issue

sick tulip
#

wait, is that the literal syntax?

#

it should be [user] with key/value assignments afterwards

brittle hazel
#

I can delete the protoocl part but it wont fix the problem

sick tulip
#

you should get rid of it regardless

#

I don't know why you have that

brittle hazel
sick tulip
#

oh, it is the chroot then

brittle hazel
#

Idk I didnt see anyone in tutorials with the same issue

#

Yeah chroot

sick tulip
#

yeah no it just dawned on me, the error message is just really badly written

#

written as "unable to get random bytes for temporary file: %s" where %s is strerror πŸ˜†

#

makes it look like the error relates to the temporary file creation, but it's actually access to the random block devices!

brittle hazel
#

Oh...

sick tulip
#

and inside of the chroot the random block devices do not work

brittle hazel
#

What does it mean tho

#

Can I still fix it

sick tulip
#

git needs access to random numbers for some tasks, probably cryptography related. You can bind the host's random block device with chroot, but I don't think the arch-chroot script exposes that option.

brittle hazel
#

Bind? You mean like /proc ? /sys ?

sick tulip
#

programs in linux obtain "true" random numbers via a block device file, like /dev/random

brittle hazel
#

Oh

sick tulip
#

I assume in the chroot, those block devices do not exist

#

since /dev is populated by the kernel

brittle hazel
#

I can mount them /mnt/dev and bind it or idk

#

Ibhave no idea what this is about

sick tulip
#

well to change the way binds work you need to edit arch-chroot.

#

why are you in a chroot anyways?

brittle hazel
#

Isnt it where I should do the changes so they are present in the installed system?

#

sudo chroot /mnt

sick tulip
#

yes, arch-chroot is what you use from the live installation medium to sort of "act" as the host system

brittle hazel
#

Arch-chroot vs chroot?

sick tulip
#

but given you are trying to clone a window manager, I presume you already have a bootloader installed. Once you've booted into the system you don't need chroot anymore.

brittle hazel
#

Omg

sick tulip
brittle hazel
#

So I don't need to use chroot now then?

sick tulip
#

if you aren't booting from a live arch medium, yes

brittle hazel
#

Im booting from bootloader

#

Selecting arch linux

sick tulip
#

ugh

#

do you have the usb plugged in when you do that

brittle hazel
#

No

sick tulip
#

then that is literally already installed

brittle hazel
#

Yeah ok thx for claryfing

sick tulip
#

what are you even chrooting into anyways πŸ˜†

#

because to "chroot" into something you need some sort of other filesystem to chroot into

#

were you chrooting into /? like that does nothing

brittle hazel
#

Into /mnt

#

So this may be the sole issue of git

sick tulip
#

okay leave the chroot for a second

#

just get out of all containers

#

and then show me the output of ls /mnt

#

because if there is a filesystem mounted to /mnt then what even is that filesystem? Did you mount the same drive you booted from? Because in that case, it's effectively a hardlink to / πŸ˜†

#

in which case the whole chroot process was pointless

#

that being said, you did actually uncover a pretty interesting oddity from arch-chroot, I would actually expect it to set up most block devices correctly, but it only really bothers with /dev/shm... might be worth reporting as an issue for cases other than this

brittle hazel
#

Sec

sick tulip
#

for instance, I can actually mount the partition I literally booted from again to /mnt/storage as an example:

brittle hazel
#

I may have double chrooted

sick tulip
#

well if you're booted from the system you don't need to chroot at all

#

you don't need to mount anything at all

#

/ is the root filesystem of the drive you installed arch onto

brittle hazel
sick tulip
#

my brother in christ you just mounted the drive you booted from

brittle hazel
#

GG

sick tulip
#

you didn't lose anything, so don't worry, it was just a completely pointless process. It all went to the same place.

brittle hazel
#

XD

#

Ok

sick tulip
#

if I boot from /dev/sda1 for example, my / is the contents of sda1, which is already mounted because you literally booted from it. But linux is flexible, and will allow you to run sudo mount /dev/sda1 /mnt to mount the device again, which means /mnt is what is called a "hardlink" to /.

brittle hazel
#

It worked

sick tulip
#

of course it did

#

but just so you know

brittle hazel
#

Omg now I know why fstab was duplicatrd

sick tulip
#

the whole process of chrooting during the install was because the live installation filesystem was distinct from the actual install filesystem.

#

but when you actually boot into arch, that is no longer the case

brittle hazel
#

I understand what you mean

#

But I cant understand how did I achieve that

sick tulip
#

because you are allowed the mount the drive you boot from in linux multiple times. And you can chroot multiple times.

brittle hazel
#

Also this is unrelated in tty1 via grub there is a very loud beep sound when I use the arrow keys where there is no text

sick tulip
#

LOL

brittle hazel
#

May be BIOS related

sick tulip
#

YOU HAVE THE BEEP SPEAKER

brittle hazel
#

Its so annoying

#

I cant do arch stuff because its too late

sick tulip
#

I didn't even know machines were made with it anymore

brittle hazel
#

Ideapad gaming 3

#

No idea how to turn it off

#

Searched everywhere

#

All is outdated

sick tulip
#

are you talking about the grub menu beeping, or the linux tty beeping?

brittle hazel
#

Tty

#

Thought it may be related but its not

sick tulip
#

if grub is beeping, it's a grub configuration issue. Various things in linux can also use the BIOS speaker, but very little software actually does since everyone kind of universally considers it annoying

#

if you want to completely stop the BIOS speaker from working after you have booted into linux, you want to blacklist pcspkr

brittle hazel
#

How

#

I remember I tried something with pcspkr and it didnt resolve this

sick tulip
#

add it to a new file in /etc/modprobe.d/, call it "blacklist-annoying-beep-thing.conf" and put blacklist pcspkr inside of that file

#

that exact filename is not mandatory but it's nice to be descriptive with configuration so you know what it does when you come across it later

#

also, it won't work until you reboot, but you can run sudo rmmod pcspkr to make it stop working immediately too

#

it will not stop grub from using it, but the linux kernel will not, and any program in linux will not access it either

#

also, if you find any software using that speaker, then you should feel morally obligated to complain at upstream developers for including such an annoying feature

brittle hazel
#

I love you so much

#

My ears and my eyes thank you

#

πŸŽ‰peepojuice

sick tulip
#

it is also a bit of a nuclear approach to stopping it from working, since you're removing the driver for it completely

#

but the pc speaker deserves it

brittle hazel
#

But the sound will work when I finish the whole installation?

sick tulip
#

if you edited that file like I said, no

#

it will reboot without the module loaded

brittle hazel
#

I added a file /etc/modprobe.d/blacklist_annoying_beep.conf

#

blacklist pcspkr

#

Inside

sick tulip
#

looks good to me

brittle hazel
sick tulip
#

btw, you can use this to blacklist any kernel module you don't want

brittle hazel
#

[SOLVED] git error while trying to clone during post-installation

brittle hazel
#

Thanks @sick tulip

opal surgeBOT
#

:(){ :|:& };: received a thank you cookie!