How to upload PKGBUILD to AUR


like somebody may know, i try to figure out how to upload a PKGBUILD to AUR.

Now i have set up my VM where i can learn/test it how to do it.

I followed this Guide:

But it didnt seem to work.

I have done this:

I crated the config file under .ssh with the content:

IdentityFile ~/.ssh/aur
User aur

Than i created a SSH Key pair with

ssh-keygen -f ~/.ssh/aur

then i uploaded the content of to my aur profile.

Than i have done this:

git clone ssh://

Than this:

git remote add label ssh://

And got this Error?:

[user@endeavourosvm ~]$ git remote add label ssh://
fatal: Kein Git-Repository (oder irgendein Elternverzeichnis bis zum Einhängepunkt /)
Stoppe bei Dateisystemgrenze (GIT_DISCOVERY_ACROSS_FILESYSTEM nicht gesetzt).
[user@endeavourosvm ~]$

And what i find interessting, i have following PKGBUILD in the pkgbase folder:

Maintainer Seva Alekseyev

Maintainer Stoyan Minaev

pkgdesc=“Japanese-Russian kanji and word dictionary”
ttf-sazanami nas

prepare() {
cd $srcdir/
echo “Due to ‘makepkg’ and ‘PKGBUILD’ specs limitations I need to dowanload sources and validate them by myself”
for source_url in ${_source[@]}; do
if [ ! -f “$source_filename” ]; then
echo “Downloading next source - $source_filename …”
curl -A DUMMY -O “$source_url”;
echo “Found already downloaded source - $source_filename”
echo “And now we must validated dowanloaded sources …”
for (( i=0; i<${#_source[@]}; ++i )); do
source_actual_md5sum=$(md5sum $source_filename | awk ‘{print $1}’)
if [ “$source_actual_md5sum” == “$source_expected_md5sum” ]; then
echo “Validated next source - $source_filename”
echo “Found corrupted source - $source_filename”; return 1

build() {
cd $srcdir/
mkdir -p deb/{$pkgname,qt4core,qt4gui,qt4network}
bsdtar xf yarxi_${pkgver}-${pkgrel}_amd64.deb -C deb/$pkgname/
bsdtar xf libqtcore4_4.8.7+dfsg-11_amd64.deb -C deb/qt4core/
bsdtar xf libqtgui4_4.8.7+dfsg-11_amd64.deb -C deb/qt4gui/
bsdtar xf libqt4-network_4.8.7+dfsg-11_amd64.deb -C deb/qt4network/
for dir in deb/$pkgname deb/qt4core deb/qt4gui deb/qt4network; do
cd $dir; tar xf data.tar.*; cd $srcdir

package() {
cd $srcdir/
mkdir -p $pkgdir/usr/lib/
mkdir -p $pkgdir/usr/bin/
mkdir -p $pkgdir/usr/share/
mkdir -p $pkgdir/usr/share/applications/
mkdir -p $pkgdir/usr/share/doc/$pkgname/
mkdir -p $pkgdir/usr/share/icons/hicolor/{16x16/apps,32x32/apps,48x48/apps}/
mkdir -p $pkgdir/usr/share/pixmaps/
mkdir -p $pkgdir/usr/share/$pkgname/
install -m 0755 $srcdir/deb/$pkgname/usr/bin/$pkgname $pkgdir/usr/bin/$pkgname
install -m 0755 $srcdir/deb/qt4core/usr/lib/x86_64-linux-gnu/ $pkgdir/usr/lib/
install -m 0755 $srcdir/deb/qt4gui/usr/lib/x86_64-linux-gnu/ $pkgdir/usr/lib/
install -m 0755 $srcdir/deb/qt4network/usr/lib/x86_64-linux-gnu/ $pkgdir/usr/lib/
install -m 0644 $srcdir/deb/$pkgname/usr/share/applications/seva-yarxi.desktop $pkgdir/usr/share/applications/
install -m 0644 $srcdir/deb/$pkgname/usr/share/doc/$pkgname/copyright $pkgdir/usr/share/doc/$pkgname/
for icons in 16x16 32x32 48x48; do
install -m 0644 $srcdir/deb/$pkgname/usr/share/icons/hicolor/$icons/apps/seva-yarxi.png $pkgdir/usr/share/icons/hicolor/$icons/apps/
install -m 0644 $srcdir/deb/$pkgname/usr/share/pixmaps/*.xpm $pkgdir/usr/share/pixmaps/
install -m 0644 $srcdir/deb/$pkgname/usr/share/$pkgname/yarxice.db $pkgdir/usr/share/$pkgname/

#vim: syntax=sh

For what? As example? Have i to delete this?

Anyway, replaced it with my PKGBUILD.

and tried:

git add PKGBUILD

But got same Error? like above.

So, i dont know what further todo and need help :grinning_face_with_smiling_eyes:

(and im still mad that i cant simply upload via browser!! :stuck_out_tongue_closed_eyes:)

You need to change the pkgbase to an actual name, or remove the line altogether.

Replace pkgbase with an actual name.

Before you do this, you need to cd inside the folder you just cloned. The folder name will be the same as the name you replaced pkgbase with in last command. Also, replace label with a name you’d like to put. Not necessary, but I prefer using origin.

Because you cloned pkgbuild for the package called pkgbase. You’re supposed to change the name. Also, I suppose the maintainer of the pkgbuild you cloned made the same mistake, and pushed their pkgbuild with a wrong name.

Listing the steps briefly:

Assuming your ssh key is set up all right.

Lets say the package it want to upload is named is geek-chat.

I do

git clone ssh://
cd geek-chat
git remote add origin ssh://
git fetch origin

Now copy your PKGBUILD into this folder. Then below commands

makepkg --printsrcinfo > .SRCINFO
git commit -m "commit message"
git push

Replace commit message with an actual descriptive one line message.

I’m not sure if git push will work the first time you do it. You may need to do git push -u origin master.

1 Like


It seems i need anywhere to create a Account? Because:

[user@endeavourosvm ~]$ ls
pkgbase PKGBUILD
[user@endeavourosvm ~]$ rm -Rf pkgbase/
[user@endeavourosvm ~]$ git clone ssh://
Klone nach ‘borgrestore’…
warning: Sie scheinen ein leeres Repository geklont zu haben.
[user@endeavourosvm ~]$ ls
borgrestore PKGBUILD
[user@endeavourosvm ~]$ mv PKGBUILD borgrestore/
[user@endeavourosvm ~]$ ls
[user@endeavourosvm ~]$ cd borgrestore/
[user@endeavourosvm borgrestore]$ ls
[user@endeavourosvm borgrestore]$ git remote add origin ssh://
error: externes Repository origin existiert bereits.
[user@endeavourosvm borgrestore]$ git fetch origin
[user@endeavourosvm borgrestore]$ ls
[user@endeavourosvm borgrestore]$ makepkg --printsrcinfo > .SRCINFO
[user@endeavourosvm borgrestore]$ cat .SRCINFO
pkgbase = borgrestore
pkgdesc = Puts the system in exactly the same state as it is in a Borg snapshot.
pkgver = 0.1
pkgrel = 0.1
arch = any
depends = git
depends = borg
depends = python-llfuse
optdepends = vorta: a nice Borg GUI
source = git+
sha512sums = SKIP

pkgname = borgrestore
[user@endeavourosvm borgrestore]$ git add PKGBUILD .SRCINFO
[user@endeavourosvm borgrestore]$ git commit -m “upload borgrestore”
Identität des Autors unbekannt

*** Bitte geben Sie an, wer Sie sind.

Führen Sie

git config --global “
git config --global “Your Name”

aus, um das als Ihre standardmäßige Identität zu setzen.
Lassen Sie die Option “–global” weg, um die Identität nur
für dieses Repository zu setzen.
fatal: Konnte die E-Mail-Adresse nicht automatisch erkennen (‘user@endeavourosvm.(none)’ erhalten)
[user@endeavourosvm borgrestore]$ git push
error: Src-Refspec refs/heads/master entspricht keiner Referenz.
error: Fehler beim Versenden einiger Referenzen nach ‘ssh://’
[user@endeavourosvm borgrestore]$ git push -u origin master
error: Src-Refspec master entspricht keiner Referenz.
error: Fehler beim Versenden einiger Referenzen nach ‘ssh://’
[user@endeavourosvm borgrestore]$


ok found

But if i try that:

[user@endeavourosvm borgrestore]$ git config --global solisinvictum
error: Schlüssel enthält keine Sektion: solisinvictum
[user@endeavourosvm borgrestore]$

Looks like you haven’t set up git.

Run these

git config --global “”
git config --global “Your Name”

Replace and Your Name with actual email and names.

Do note, users will be able to see the email, so you may want to use an alternate email or a non existent email. That being said, I haven’t faced any spam.


after this, run the commit command

1 Like

Also, if you’re not comfortable with git/pkgbuild, I could maintain the package on AUR for you?

lol. Thanks! I already asked here: Suggestion of Packages for the EndeavourOS Repo :grinning_face_with_smiling_eyes:

But sorry. Very nice of you. But now is too late. Now i want to learn it how to upload/manage it to AUR.

I now really good how to create/maintaine PKGBUILD self. Wich folders i dont allow to use, the regulations and so on. This not my first time.

Its only my first time to upload it via git. Years ago i could do it simply via browser.

Yeah there i was little faster as you :slight_smile:

Found the Wikientry about that. but it seems its still something wrong:

[user@endeavourosvm borgrestore]$ git config --global solisinvictum
error: Schlüssel enthält keine Sektion: solisinvictum
[user@endeavourosvm borgrestore]$

My Goal is to upload/maintain the Packages borgrestore, ds360 and wireguird.

Does not look like correct command.

See the commands here

This is same as the one given on link you posted earlier :

Ah, i thought i need to replace “” with the actual username.


It worked.

1 Like

Installed it :+1:

1 Like

Now i need to learn how to update it?

Or to do this, need i to do all steps again?

When updating, you edit Pkgbuild with new version name and any other command (if needed)


makepkg --printsrcinfo > .SRCINFO
git commit -m "commit message"
git push
1 Like

Ok. Understand.

And for a new pakage it would be like so:

git clone ssh://
git remote add origin ssh://
git fetch origin

makepkg --printsrcinfo > .SRCINFO
git commit -m “commit message”
git push

Yes. :+1:

Nice. Thanks a lot for your help and clearification how to do it.

Pushed a new update to borgrestore because of

and it worked :slight_smile:

Now i know how to do it. Thanks!

1 Like

Hey sorry for jumping in. I just wanted to know because I’m also trying to learn AUR upload.

The only things that one needs to have configured are an SSH key on his/her AUR/Arch account and to have a similar git repo set at AUR just like we do for GitLab or GitHub. Clone a repo from AUR copy files from my repo to the AUR repo folder thenPKGBUILD with a .SRCINFOand then push the content of the current AUR repo folder to the AUR repo.

Am I correct?

Didn’t understand this part :thinking:

When you clone a package link that does not exist, you get an empty repo. And when you make the first commit to it and push, the package automatically gets associated with your account.

Yes. Just make sure the link you clone doesn’t already exist.

1 Like


Liked described here. @flyingcakes did a good job to explain it to me.

I was referring to this command.
git clone ssh://

Because we do the same when we’re cloning from a GitLab or Hub repo. But I don’t see a way to create a repo beforehand like in GitLab or Hub.

Just running git clone with the ssh:// initiate the local repo then push would initiate remote repo at AUR and create it. Is that what happens?

AUR automatically creates a repo (aka package page) when you push at a link that doesn’t yet exist.

Thank you,

This is what I was confused about because GitLab or Hub kind of need to have the repo ready when pushing from local to remote (correct me if I’m worng).

1 Like