Compare commits

...

No commits in common. "master" and "pages" have entirely different histories.

204 changed files with 18506 additions and 4560 deletions

4
.gitignore vendored
View File

@ -1,4 +0,0 @@
public/
bin/
tmp
*~

View File

@ -1,15 +0,0 @@
pipeline:
build:
image: python
when:
event: [ push, pull_request, tag, deployment ]
commands:
- make env
- make
deploy:
image: python
when:
event: [ push, tag, deployment ]
commands:
- make ci-deploy
secrets: [ pages_deploy_secret, hostea_write_deploy_key ]

3
404.html Normal file
View File

@ -0,0 +1,3 @@
<!doctype html>
<title>404 Not Found</title>
<h1>404 Not Found</h1>

View File

@ -1,660 +0,0 @@
### GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
### Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains
free software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing
under this license.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS
#### 0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public
License.
"Copyright" also means copyright-like laws that apply to other kinds
of works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of
an exact copy. The resulting work is called a "modified version" of
the earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.
An interactive user interface displays "Appropriate Legal Notices" to
the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
#### 1. Source Code.
The "source code" for a work means the preferred form of the work for
making modifications to it. "Object code" means any non-source form of
a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same
work.
#### 2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey,
without conditions so long as your license otherwise remains in force.
You may convey covered works to others for the sole purpose of having
them make modifications exclusively for you, or provide you with
facilities for running those works, provided that you comply with the
terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for
you must do so exclusively on your behalf, under your direction and
control, on terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10 makes
it unnecessary.
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit
operation or modification of the work as a means of enforcing, against
the work's users, your or third parties' legal rights to forbid
circumvention of technological measures.
#### 4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
#### 5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:
- a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
- b) The work must carry prominent notices stating that it is
released under this License and any conditions added under
section 7. This requirement modifies the requirement in section 4
to "keep intact all notices".
- c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
- d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
#### 6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:
- a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
- b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge.
- c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
- d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
- e) Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the general
public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a
consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
"normally used" refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected
to use, the product. A product is a consumer product regardless of
whether the product has substantial commercial, industrial or
non-consumer uses, unless such uses represent the only significant
mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The
information must suffice to ensure that the continued functioning of
the modified object code is in no case prevented or interfered with
solely because modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or
updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or
installed. Access to a network may be denied when the modification
itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the
network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
#### 7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:
- a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
- b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
- c) Prohibiting misrepresentation of the origin of that material,
or requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
- d) Limiting the use for publicity purposes of names of licensors
or authors of the material; or
- e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
- f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions
of it) with contractual assumptions of liability to the recipient,
for any liability that these contractual assumptions directly
impose on those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions; the
above requirements apply either way.
#### 8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
#### 9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
#### 10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
#### 11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned
or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on
the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you
are a party to an arrangement with a third party that is in the
business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties
who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by
you (or copies made from those copies), or (b) primarily for and in
connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent
license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
#### 12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under
this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree to
terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
#### 13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your
version supports such interaction) an opportunity to receive the
Corresponding Source of your version by providing access to the
Corresponding Source from a network server at no charge, through some
standard or customary means of facilitating copying of software. This
Corresponding Source shall include the Corresponding Source for any
work covered by version 3 of the GNU General Public License that is
incorporated pursuant to the following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
#### 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Affero General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever
published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions
of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
#### 15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
#### 16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#### 17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively state
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper
mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for
the specific requirements.
You should also get your employer (if you work as a programmer) or
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. For more information on this, and how to apply and follow
the GNU AGPL, see <https://www.gnu.org/licenses/>.

View File

@ -1,27 +0,0 @@
default: ## Build the website
./scripts/spellcheck.sh --check
./scripts/zola.sh build
clean: ## Clean build assets
./scripts/zola.sh clean
ci-deploy: ## Deploy from CI/CD. Only call from within CI
@if [ "${CI}" != "woodpecker" ]; \
then echo "Only call from within CI. Will re-write your local Git configuration. To override, set export CI=woodpecker"; \
exit 1; \
fi
git config --global user.email "${CI_COMMIT_AUTHOR_EMAIL}"
git config --global user.name "${CI_COMMIT_AUTHOR}"
./scripts/zola.sh deploy pages public "${CI_COMMIT_AUTHOR} <${CI_COMMIT_AUTHOR_EMAIL}>"
./scripts/ci.sh --init "$$HOSTEA_WRITE_DEPLOY_KEY"
./scripts/ci.sh --deploy ${PAGES_DEPLOY_SECRET} pages
./scripts/ci.sh --clean
env: ## Download build dependencies and setup dev environment
./scripts/zola.sh install
help: ## Prints help for targets with comments
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
serve: ## Serve website during development
./scripts/zola.sh zola -- serve

View File

@ -1,51 +0,0 @@
<div align="center">
<img width="80px" alt="Gna! logo" src="./static/gna-logo-rectangle.png" />
<h1>Gna! Website</h1>
[![status-badge](https://woodpecker.gna.org/api/badges/Gna/website/status.svg)](https://woodpecker.gna.org/Gna/website)
[![AGPL License](https://img.shields.io/badge/license-AGPL-blue.svg?style=flat-square)](http://www.gnu.org/licenses/agpl-3.0)
</div>
## Development environment
This website uses [Zola](https://www.getzola.org/), an easy to use static site generator.
To get started:
1. Install Zola:
```bash
Make env
```
2. Live reload
```bash
make serve
```
3. Make changes and publish
```bash
make
```
Build artifacts should be available in `./public/`
## Deployment
This repository uses [Gna!
Woodpecker-CI](https://woodpecker.gna.org/) to build and
[Librepages](https://librepages.org/) to deploy on each
commit.
To setup the CI:
* `ssh-keygen -b 4096 -f /tmp/pages`
* `xclip -sel clip -in < /tmp/pages.pub`
* use that to add a key in https://forgejo.gna.org/Gna/website/settings/keys (with write access)
* xclip -sel clip -in < /tmp/pages
* use that to add the hostea_write_deploy_key (see [.woodpecker.yml](https://forgejo.gna.org/Gna/website/src/branch/master/.woodpecker.yml#L10)) in https://woodpecker.gna.org/Gna/website/settings#secrets
* get the secret for pages in ~/.enough/gna.org/inventory/group_vars/pages-service-group.yml
* add secret for pages in https://woodpecker.gna.org/Gna/website/settings#secrets under the name **pages_deploy_secret** to match [.woodpecker.yml](https://forgejo.gna.org/Gna/website/src/branch/master/.woodpecker.yml#L10)

285
about/index.html Normal file
View File

@ -0,0 +1,285 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>About | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="About" />
<meta property="og:title" content="About | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="About" />
<meta
property="og:site_name"
content="About | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">About</h1>
<div class="page__group-content">
<p>Gna! provides <a href="https://hosteadashboard.gna.org/dash/instance/new/">dedicated managed Forgejo hosting</a>, including <a href="https://woodpecker-ci.org/">Woodpecker CI</a>. Security updates are applied as soon as they are available and carefully tested. Each Forgejo instance is monitored 24/7 and has backups.</p>
<video width="600" controls>
<source src="https://cloud.forgefriends.org/s/xXLcYpsE469tJEj/download?path=&files=hostea-screencast-vm-create.mp4" type="video/mp4" />
</video>
<p>You can rely on Gna! if you are an individual software developer who need their own Forgejo instance with CI but can't be bothered with installation and maintenance. You want the freedom to download a backup and seamlessly self-host it whenever you decide: no strings attached.</p>
<p>If you are into trouble and need assistance with a Forgejo instance not hosted at Gna!, you <a href="/forgejo-clinic/">can ask for help at the Gna! clinic</a>. The doctors have developped a unique expertise and are well equiped to help you recover and upgrade.</p>
<hr />
<p>Do you already have an expertise running Forgejo? You are welcome to join the <a href="https://forum.gna.org/t/57">Gna! collective</a>, get in touch <a href="https://forum.gna.org/c/site-feedback/2">in the forum</a> or <a href="https://matrix.to/#/#hostea:matrix.batsense.net">the chat</a>.</p>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 838 B

After

Width:  |  Height:  |  Size: 838 B

View File

Before

Width:  |  Height:  |  Size: 912 B

After

Width:  |  Height:  |  Size: 912 B

View File

Before

Width:  |  Height:  |  Size: 1003 B

After

Width:  |  Height:  |  Size: 1003 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 941 B

After

Width:  |  Height:  |  Size: 941 B

View File

Before

Width:  |  Height:  |  Size: 961 B

After

Width:  |  Height:  |  Size: 961 B

View File

Before

Width:  |  Height:  |  Size: 1003 B

After

Width:  |  Height:  |  Size: 1003 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,338 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>[security] Gitea &lt; 1.17.2 bypassing URL restrictions during migration explained | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Prior to Gitea 1.17.2 a malicious Gitea server could be used to request local files using the migration web interface or the REST API." />
<meta property="og:title" content="[security] Gitea &lt; 1.17.2 bypassing URL restrictions during migration explained | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="Prior to Gitea 1.17.2 a malicious Gitea server could be used to request local files using the migration web interface or the REST API." />
<meta
property="og:site_name"
content="[security] Gitea &lt; 1.17.2 bypassing URL restrictions during migration explained | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">[security] Gitea &lt; 1.17.2 bypassing URL restrictions during migration explained</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 24
October
,
2022 &middot; <b>2 min read</b>
</p>
<div class="blog__content">
<p><a href="https://pouet.chapril.org/@gna/108953815492944898">Gitea 1.17.2</a> includes a <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/commit/e6b3be460840f1f982d5358198466e7d6f509d21">security patch</a> that prevents bypassing URL restrictions during the migration of a remote repository.</p>
<p>When using the web interface or the REST API to <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/upstream/routers/api/v1/repo/migrate.go#L209-212">import / migrate a repository</a> that exists on another forge, the URL of the remote forge is <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/routers/api/v1/repo/migrate.go#L109">verified</a> and rejected if not allowed. For instance if it starts with <strong>file://</strong>, contains <strong>%0c</strong> <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/services/migrations/migrate.go#L43">and more</a>.</p>
<p>The migration then starts by <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/services/migrations/migrate.go#L185">asking for more information</a> about the software project to be migrated, using this verified URL. The structure that is returned is supposed to contain an exact copy of the URL from which the migration must be done. But there is no guarantee that it does and some of the drivers implemented in Gitea may return a different URL.</p>
<p>For instance, when migrating a project from another Gitea instance, the Gitea migration driver <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/services/migrations/gitea_downloader.go#L153">calls the GetRepo</a> function of the Gitea SDK, which returns the result of the <a href="https://try.gitea.io/api/swagger#/repository/repoGet">/repos/{owner}/{repo}</a> endpoint verbatim.</p>
<p>If a malicious server is setup by an adversary so that the <strong>/repos/{owner}/{repo}</strong> enpoint returns a URL designed to leak information from the server such as <strong>file:///etc/group</strong>, it should also be verified and discarded. This is the purpose of the <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/services/migrations/migrate.go#L201-220">check that was added</a> in Gitea 1.17.2.</p>
<pre data-lang="go" style="background-color:#2b303b;color:#c0c5ce;" class="language-go "><code class="language-go" data-lang="go"><span> </span><span style="color:#65737e;">// SECURITY: If the downloader is not a RepositoryRestorer then we need to recheck the CloneURL
</span><span> </span><span style="color:#b48ead;">if </span><span style="color:#bf616a;">_</span><span>, </span><span style="color:#bf616a;">ok </span><span>:= </span><span style="color:#bf616a;">downloader</span><span>.(*</span><span style="color:#b48ead;">RepositoryRestorer</span><span>); !</span><span style="color:#bf616a;">ok </span><span>{
</span><span> </span><span style="color:#65737e;">// Now the clone URL can be rewritten by the downloader so we must recheck
</span><span> </span><span style="color:#b48ead;">if </span><span style="color:#bf616a;">err </span><span>:= </span><span style="color:#bf616a;">IsMigrateURLAllowed</span><span>(</span><span style="color:#bf616a;">repo</span><span>.</span><span style="color:#bf616a;">CloneURL</span><span>, </span><span style="color:#bf616a;">doer</span><span>); </span><span style="color:#bf616a;">err </span><span>!= </span><span style="color:#d08770;">nil </span><span>{
</span><span> </span><span style="color:#b48ead;">return </span><span style="color:#bf616a;">err
</span><span> }
</span><span>
</span><span> </span><span style="color:#65737e;">// SECURITY: Ensure that we haven&#39;t been redirected from an external to a local filesystem
</span><span> </span><span style="color:#65737e;">// Now we know all of these must parse
</span><span> </span><span style="color:#bf616a;">cloneAddrURL</span><span>, </span><span style="color:#bf616a;">_ </span><span>:= </span><span style="color:#bf616a;">url</span><span>.</span><span style="color:#bf616a;">Parse</span><span>(</span><span style="color:#bf616a;">opts</span><span>.</span><span style="color:#bf616a;">CloneAddr</span><span>)
</span><span> </span><span style="color:#bf616a;">cloneURL</span><span>, </span><span style="color:#bf616a;">_ </span><span>:= </span><span style="color:#bf616a;">url</span><span>.</span><span style="color:#bf616a;">Parse</span><span>(</span><span style="color:#bf616a;">repo</span><span>.</span><span style="color:#bf616a;">CloneURL</span><span>)
</span><span>
</span><span> </span><span style="color:#b48ead;">if </span><span style="color:#bf616a;">cloneURL</span><span>.</span><span style="color:#bf616a;">Scheme </span><span>== &quot;</span><span style="color:#a3be8c;">file</span><span>&quot; || </span><span style="color:#bf616a;">cloneURL</span><span>.</span><span style="color:#bf616a;">Scheme </span><span>== &quot;&quot; {
</span><span> </span><span style="color:#b48ead;">if </span><span style="color:#bf616a;">cloneAddrURL</span><span>.</span><span style="color:#bf616a;">Scheme </span><span>!= &quot;</span><span style="color:#a3be8c;">file</span><span>&quot; &amp;&amp; </span><span style="color:#bf616a;">cloneAddrURL</span><span>.</span><span style="color:#bf616a;">Scheme </span><span>!= &quot;&quot; {
</span><span> </span><span style="color:#b48ead;">return </span><span style="color:#bf616a;">fmt</span><span>.</span><span style="color:#bf616a;">Errorf</span><span>(&quot;</span><span style="color:#a3be8c;">repo info has changed from external to local filesystem</span><span>&quot;)
</span><span> }
</span><span> }
</span><span>
</span><span> </span><span style="color:#65737e;">// We don&#39;t actually need to check the OriginalURL as it isn&#39;t used anywhere
</span><span> }
</span></code></pre>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/security">#security</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/solution">#solution</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,327 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>[security] Gitea &lt; 1.17.3 git option injection explained | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Prior to Gitea 1.17.3 the web interface that displays the commit graph could be used to inject git options used by the Gitea server." />
<meta property="og:title" content="[security] Gitea &lt; 1.17.3 git option injection explained | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="Prior to Gitea 1.17.3 the web interface that displays the commit graph could be used to inject git options used by the Gitea server." />
<meta
property="og:site_name"
content="[security] Gitea &lt; 1.17.3 git option injection explained | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">[security] Gitea &lt; 1.17.3 git option injection explained</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 17
October
,
2022 &middot; <b>2 min read</b>
</p>
<div class="blog__content">
<p><a href="https://pouet.chapril.org/@gna/109176306611564720">Gitea 1.17.3</a> includes a <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/commit/d98c5db58fdeded983bf5c0fe781fd7b77a1235f">security patch</a> that prevents the injection of arguments to the git command run by Gitea.</p>
<p>When displaying the commit graph <a href="https://gitea.gna.org/Gna/organization/graph?branch=refs%2Fheads%2Fmaster">for the master branch</a>, the URL contains the argument <strong>refs%2Fheads%2Fmaster</strong> that is passed to the <code>git</code> command with something like:</p>
<pre data-lang="shell" style="background-color:#2b303b;color:#c0c5ce;" class="language-shell "><code class="language-shell" data-lang="shell"><span>git log --graph refs/head/master
</span></code></pre>
<p>If, by accident or maliciously, the branch name starts with a dash, it would be mistaken to be a <code>git</code> argument instead of a branch name. For instance <strong>-h</strong> could be passed to the <code>git</code> command as:</p>
<pre data-lang="shell" style="background-color:#2b303b;color:#c0c5ce;" class="language-shell "><code class="language-shell" data-lang="shell"><span>git log --graph -h
</span></code></pre>
<p>In reality the <code>rev-list</code> command is called before <code>log</code> and in Gitea 1.17.2 the debug output will show something like:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>2022/10/17 07:17:17 ...s/web/repo/commit.go:124:Graph() [W] [634d017d] GetCommitGraphsCount error for generate graph exclude prs: false branches: [-h] in 1:root/test, Will Ignore branches and try again. Underlying Error: exit status 129 - usage: git rev-list [&lt;options&gt;] &lt;commit-id&gt;... [-- &lt;path&gt;...]
</span><span>...
</span></code></pre>
<p>In Gitea 1.17.3 when the same command is run, the option is discarded and the debug output shows something like:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>2022/10/17 07:25:05 ...dules/git/command.go:166:Run() [E] [634d0351] git command is broken: /usr/bin/git -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true -c credential.helper= rev-list --count, broken args: -h
</span><span>2022/10/17 07:25:05 ...s/web/repo/commit.go:124:Graph() [W] [634d0351] GetCommitGraphsCount error for generate graph exclude prs: false branches: [-h] in 1:root/test, Will Ignore branches and try again. Underlying Error: git command is broken
</span></code></pre>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/security">#security</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/solution">#solution</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,338 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>1.17 breaking changes episode 1: preserving a custom gitconfig | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="The location of the gitconfig file used by Gitea moved and custom modifications must be manually moved as well." />
<meta property="og:title" content="1.17 breaking changes episode 1: preserving a custom gitconfig | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="The location of the gitconfig file used by Gitea moved and custom modifications must be manually moved as well." />
<meta
property="og:site_name"
content="1.17 breaking changes episode 1: preserving a custom gitconfig | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">1.17 breaking changes episode 1: preserving a custom gitconfig</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 22
June
,
2022 &middot; <b>2 min read</b>
</p>
<div class="blog__content">
<p>Before version 1.17, when Gitea needed to change the <a href="https://git-scm.com/docs/git-config">git configuration</a>, it modified the <code>$HOME/.gitconfig</code> file. For instance it would <a href="https://github.com/go-gitea/gitea/blob/release/v1.16/modules/git/git.go#L174-L177">set core.quotePath to false</a>:</p>
<pre data-lang="ini" style="background-color:#2b303b;color:#c0c5ce;" class="language-ini "><code class="language-ini" data-lang="ini"><span style="color:#b48ead;">[core]
</span><span> </span><span style="color:#bf616a;">quotePath </span><span>= </span><span style="color:#d08770;">false
</span></code></pre>
<p>When installing Gitea <a href="https://docs.gitea.io/en-us/install-with-docker/">from docker</a> or <a href="https://docs.gitea.io/en-us/install-with-docker-rootless/">rootless</a> or even <a href="https://docs.gitea.io/en-us/install-from-binary/">from binary</a> this <code>$HOME/.gitconfig</code> file belongs to a user that is <a href="https://docs.gitea.io/en-us/install-from-binary/#prepare-environment">dedicated to Gitea</a> and not used by anyone else.</p>
<p>However, if an Gitea installation was done differently and <code>$HOME/.gitconfig</code> has been customized because it is shared by a user or another application, there is a good chance that manual modifications were done such as:</p>
<pre data-lang="ini" style="background-color:#2b303b;color:#c0c5ce;" class="language-ini "><code class="language-ini" data-lang="ini"><span style="color:#b48ead;">[user]
</span><span> </span><span style="color:#bf616a;">name </span><span>= Jane Doe
</span><span> </span><span style="color:#bf616a;">email </span><span>= jane</span><span style="color:#b48ead;">@doe</span><span>.com
</span></code></pre>
<p>It is also possible that the file was modified manually by the Gitea admin for other reasons. In both there is a <strong>potential for breakage when upgrading to Gitea &gt;= 1.17 because the location of the file changed</strong>. It must be moved manually to the new location as follows:</p>
<ul>
<li>Figure out the directory where <code>$HOME/.gitconfig</code> must be moved by <a href="https://gna.org/blog/gentle-introduction-to-the-doctor/">running the doctor</a>:</li>
</ul>
<pre data-lang="shell" style="background-color:#2b303b;color:#c0c5ce;" class="language-shell "><code class="language-shell" data-lang="shell"><span>$ gitea --work-path /app/gitea -c /data/gitea/conf/app.ini doctor
</span><span>[1] Check paths and basic configuration
</span><span> - [I] Configuration File Path: &quot;/data/gitea/conf/app.ini&quot;
</span><span> - [I] Repository Root Path: &quot;/data/git/repositories&quot;
</span><span> - [I] Data Root Path: &quot;/data/gitea&quot;
</span><span> - [I] Custom File Root Path: &quot;/data/gitea&quot;
</span><span> - [I] Work directory: &quot;/app/gitea&quot;
</span><span> - [I] Log Root Path: &quot;/data/gitea/log&quot;
</span><span>OK
</span></code></pre>
<ul>
<li>Copy the <code>$HOME/.gitconfig</code> file to the <strong>Repository Root Path</strong> (which is <code>/data/git/repositories</code> in the example above).</li>
</ul>
<p>The reason why this breaking change was introduced is to workaround <a href="https://gna.org/blog/unsafe-repository-is-owned-by-someone-else/">a rare problem</a> impacting Gitea installations relying on networked volumes.</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/tutorial">#tutorial</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,330 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>1.17 breaking changes episode 2: preserving a custom gitconfig | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="The location of the gitconfig file used by Gitea moved twice, here is a guide to sort out why and how to deal with it." />
<meta property="og:title" content="1.17 breaking changes episode 2: preserving a custom gitconfig | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="The location of the gitconfig file used by Gitea moved twice, here is a guide to sort out why and how to deal with it." />
<meta
property="og:site_name"
content="1.17 breaking changes episode 2: preserving a custom gitconfig | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">1.17 breaking changes episode 2: preserving a custom gitconfig</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 20
July
,
2022 &middot; <b>2 min read</b>
</p>
<div class="blog__content">
<p>On June 21st, 2022 1.17.0-rc1 was published and the location of the gitconfig file moved to a new location, <a href="2022-06-23-1.17-breaking-episode-1">which required manual intervention</a>. This change impacted a large number of Gitea installations because the docker image tag <strong>latest</strong> <a href="https://mastodon.online/@hostea/108514134565401798">was set to 1.17.0-rc1</a> by accident. As a result, about 10,000 pulls per hour from the docker hub got the release candidate instead of the expected stable version.</p>
<p>Unfortunately moving the git home directory in 1.17.0-rc1 was implemented in way that created a security problem. The <a href="https://github.com/go-gitea/gitea/pull/20114">fix that was merged in Gitea</a> to fix it requires moving the gitconfig file and was released July 19th, 2022 in 1.17.0-rc2.</p>
<p>This would have been a minor inconvenience if it only has an impact on adventurous people trying the release candidate in a test environment. But since all Gitea production installations based on the <strong>latest</strong> tag were inadvertently upgraded to 1.17.0-rc1, the admins who moved their custom .gitconfig will need to move it one more time when upgrading to 1.17.0-rc2.</p>
<p>In 1.17.0-rc2, a custom .gitconfig must be moved manually to the <a href="https://docs.gitea.io/en-us/config-cheat-sheet/#git-git">new git home directory</a> as follows:</p>
<ul>
<li>Figure out the directory where <code>$HOME/.gitconfig</code> must be moved by <a href="https://gna.org/blog/gentle-introduction-to-the-doctor/">running the doctor</a>:</li>
</ul>
<pre data-lang="shell" style="background-color:#2b303b;color:#c0c5ce;" class="language-shell "><code class="language-shell" data-lang="shell"><span>$ gitea --work-path /app/gitea -c /data/gitea/conf/app.ini doctor
</span><span>[1] Check paths and basic configuration
</span><span> - [I] Configuration File Path: &quot;/data/gitea/conf/app.ini&quot;
</span><span> - [I] Repository Root Path: &quot;/data/git/repositories&quot;
</span><span> - [I] Data Root Path: &quot;/data/gitea&quot;
</span><span> - [I] Custom File Root Path: &quot;/data/gitea&quot;
</span><span> - [I] Work directory: &quot;/app/gitea&quot;
</span><span> - [I] Log Root Path: &quot;/data/gitea/log&quot;
</span><span>OK
</span></code></pre>
<ul>
<li>Copy the <code>$HOME/.gitconfig</code> file to the <strong>Data Root Path</strong>/home (which is <code>/data/gitea/home</code> in the example above).</li>
</ul>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/tutorial">#tutorial</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,334 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Introducing Gna! | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Introducing Hostea, a project Loïc Dachary and Aravinth Manivannan are working on to create a 100% Free software development suite, complete with CI&#x2F;CD, static pages and gists" />
<meta property="og:title" content="Introducing Gna! | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="Introducing Hostea, a project Loïc Dachary and Aravinth Manivannan are working on to create a 100% Free software development suite, complete with CI&#x2F;CD, static pages and gists" />
<meta
property="og:site_name"
content="Introducing Gna! | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">Introducing Gna!</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;batsense.net" class="post__author">Aravinth Manivannan</a>
&middot; 22
April
,
2022 &middot; <b>1 min read</b>
</p>
<div class="blog__content">
<p>Introducing <a href="https://gna.org">Hostea</a>, a project <a href="https://dachary.org">Loïc
Dachary</a> and <a href="https://batsense.net">Aravinth
Manivannan</a> are working on to create a full Free
software development suite based on
<a href="https://gitea.io">Gitea</a> for the forge, <a href="https://woodpecker-ci.org">Woodpecker
CI</a> for CI/CD,
<a href="https://github.com/realaravinth/pages">Pages</a> for static sites and
<a href="https://gitpad.org">GitPad</a> for gists.</p>
<p>This talk introduces the projects goals and philosophy behind the
project.</p>
<p>Please see
<a href="https://forum.forgefriends.org/t/forgefriends-monthly-update-april-22st-2022-5pm-6pm-utc-2/673">here</a>
to learn more about the event.</p>
<h2 id="details">Details<a class="zola-anchor" href="#details" aria-label="Anchor link for: details"
><span class="anchor-icon">#</span></a
>
</h2>
<ul>
<li><strong>organised by:</strong> <a href="https://forgefriends.org">forgefriends.org</a></li>
<li><strong>date:</strong> 2022<sup>th</sup> April, 2022</li>
<li><strong>venue:</strong> Online</li>
</ul>
<h2 id="resources">Resources<a class="zola-anchor" href="#resources" aria-label="Anchor link for: resources"
><span class="anchor-icon">#</span></a
>
</h2>
<ul>
<li><a href="./slides/2022-04-22-forgefriends-introducing-hostea.odp">slides(ODP)</a></li>
<li><a href="./slides/2022-04-22-forgefriends-introducing-hostea.pdf">slides(PDF)</a></li>
</ul>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/hostea">#hostea</a>
<a class="blog__post-tag" href="/tags/forgefriends">#forgefriends</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

815
blog/atom.xml Normal file
View File

@ -0,0 +1,815 @@
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title> - Posts</title>
<link href="https://gna.org/blog/atom.xml" rel="self" type="application/atom+xml"/>
<link href="https://gna.org/blog/"/>
<generator uri="https://www.getzola.org/">Zola</generator>
<updated>2022-10-24T00:00:00+00:00</updated>
<id>https://gna.org/blog/atom.xml</id>
<entry xml:lang="en">
<title>[security] Gitea &lt; 1.17.2 bypassing URL restrictions during migration explained</title>
<published>2022-10-24T00:00:00+00:00</published>
<updated>2022-10-24T00:00:00+00:00</updated>
<link href="https://gna.org/blog/1-17-2-migration-security/" type="text/html"/>
<id>https://gna.org/blog/1-17-2-migration-security/</id>
<content type="html">&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna&#x2F;108953815492944898&quot;&gt;Gitea 1.17.2&lt;&#x2F;a&gt; includes a &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;commit&#x2F;e6b3be460840f1f982d5358198466e7d6f509d21&quot;&gt;security patch&lt;&#x2F;a&gt; that prevents bypassing URL restrictions during the migration of a remote repository.&lt;&#x2F;p&gt;
&lt;p&gt;When using the web interface or the REST API to &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;blob&#x2F;upstream&#x2F;routers&#x2F;api&#x2F;v1&#x2F;repo&#x2F;migrate.go#L209-212&quot;&gt;import &#x2F; migrate a repository&lt;&#x2F;a&gt; that exists on another forge, the URL of the remote forge is &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;blob&#x2F;9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb&#x2F;routers&#x2F;api&#x2F;v1&#x2F;repo&#x2F;migrate.go#L109&quot;&gt;verified&lt;&#x2F;a&gt; and rejected if not allowed. For instance if it starts with &lt;strong&gt;file:&#x2F;&#x2F;&lt;&#x2F;strong&gt;, contains &lt;strong&gt;%0c&lt;&#x2F;strong&gt; &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;blob&#x2F;9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb&#x2F;services&#x2F;migrations&#x2F;migrate.go#L43&quot;&gt;and more&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The migration then starts by &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;blob&#x2F;9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb&#x2F;services&#x2F;migrations&#x2F;migrate.go#L185&quot;&gt;asking for more information&lt;&#x2F;a&gt; about the software project to be migrated, using this verified URL. The structure that is returned is supposed to contain an exact copy of the URL from which the migration must be done. But there is no guarantee that it does and some of the drivers implemented in Gitea may return a different URL.&lt;&#x2F;p&gt;
&lt;p&gt;For instance, when migrating a project from another Gitea instance, the Gitea migration driver &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;blob&#x2F;9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb&#x2F;services&#x2F;migrations&#x2F;gitea_downloader.go#L153&quot;&gt;calls the GetRepo&lt;&#x2F;a&gt; function of the Gitea SDK, which returns the result of the &lt;a href=&quot;https:&#x2F;&#x2F;try.gitea.io&#x2F;api&#x2F;swagger#&#x2F;repository&#x2F;repoGet&quot;&gt;&#x2F;repos&#x2F;{owner}&#x2F;{repo}&lt;&#x2F;a&gt; endpoint verbatim.&lt;&#x2F;p&gt;
&lt;p&gt;If a malicious server is setup by an adversary so that the &lt;strong&gt;&#x2F;repos&#x2F;{owner}&#x2F;{repo}&lt;&#x2F;strong&gt; enpoint returns a URL designed to leak information from the server such as &lt;strong&gt;file:&#x2F;&#x2F;&#x2F;etc&#x2F;group&lt;&#x2F;strong&gt;, it should also be verified and discarded. This is the purpose of the &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;blob&#x2F;9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb&#x2F;services&#x2F;migrations&#x2F;migrate.go#L201-220&quot;&gt;check that was added&lt;&#x2F;a&gt; in Gitea 1.17.2.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;go&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-go &quot;&gt;&lt;code class=&quot;language-go&quot; data-lang=&quot;go&quot;&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F; SECURITY: If the downloader is not a RepositoryRestorer then we need to recheck the CloneURL
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;if &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;_&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;ok &lt;&#x2F;span&gt;&lt;span&gt;:= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;downloader&lt;&#x2F;span&gt;&lt;span&gt;.(*&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;RepositoryRestorer&lt;&#x2F;span&gt;&lt;span&gt;); !&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;ok &lt;&#x2F;span&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F; Now the clone URL can be rewritten by the downloader so we must recheck
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;if &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;err &lt;&#x2F;span&gt;&lt;span&gt;:= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;IsMigrateURLAllowed&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;repo&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;CloneURL&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;doer&lt;&#x2F;span&gt;&lt;span&gt;); &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;err &lt;&#x2F;span&gt;&lt;span&gt;!= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;nil &lt;&#x2F;span&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;return &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;err
&lt;&#x2F;span&gt;&lt;span&gt; }
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F; SECURITY: Ensure that we haven&amp;#39;t been redirected from an external to a local filesystem
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F; Now we know all of these must parse
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;cloneAddrURL&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;_ &lt;&#x2F;span&gt;&lt;span&gt;:= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Parse&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;opts&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;CloneAddr&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;cloneURL&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;_ &lt;&#x2F;span&gt;&lt;span&gt;:= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;url&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Parse&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;repo&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;CloneURL&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;if &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;cloneURL&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Scheme &lt;&#x2F;span&gt;&lt;span&gt;== &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;file&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; || &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;cloneURL&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Scheme &lt;&#x2F;span&gt;&lt;span&gt;== &amp;quot;&amp;quot; {
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;if &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;cloneAddrURL&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Scheme &lt;&#x2F;span&gt;&lt;span&gt;!= &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;file&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;amp;&amp;amp; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;cloneAddrURL&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Scheme &lt;&#x2F;span&gt;&lt;span&gt;!= &amp;quot;&amp;quot; {
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;return &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;fmt&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Errorf&lt;&#x2F;span&gt;&lt;span&gt;(&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;repo info has changed from external to local filesystem&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)
&lt;&#x2F;span&gt;&lt;span&gt; }
&lt;&#x2F;span&gt;&lt;span&gt; }
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;&#x2F;&#x2F; We don&amp;#39;t actually need to check the OriginalURL as it isn&amp;#39;t used anywhere
&lt;&#x2F;span&gt;&lt;span&gt; }
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
</entry>
<entry xml:lang="en">
<title>[security] Gitea &lt; 1.17.3 git option injection explained</title>
<published>2022-10-17T00:00:00+00:00</published>
<updated>2022-10-17T00:00:00+00:00</updated>
<link href="https://gna.org/blog/1-17-3-git-security/" type="text/html"/>
<id>https://gna.org/blog/1-17-3-git-security/</id>
<content type="html">&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna&#x2F;109176306611564720&quot;&gt;Gitea 1.17.3&lt;&#x2F;a&gt; includes a &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;commit&#x2F;d98c5db58fdeded983bf5c0fe781fd7b77a1235f&quot;&gt;security patch&lt;&#x2F;a&gt; that prevents the injection of arguments to the git command run by Gitea.&lt;&#x2F;p&gt;
&lt;p&gt;When displaying the commit graph &lt;a href=&quot;https:&#x2F;&#x2F;gitea.gna.org&#x2F;Gna&#x2F;organization&#x2F;graph?branch=refs%2Fheads%2Fmaster&quot;&gt;for the master branch&lt;&#x2F;a&gt;, the URL contains the argument &lt;strong&gt;refs%2Fheads%2Fmaster&lt;&#x2F;strong&gt; that is passed to the &lt;code&gt;git&lt;&#x2F;code&gt; command with something like:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;shell&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-shell &quot;&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span&gt;git log --graph refs&#x2F;head&#x2F;master
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If, by accident or maliciously, the branch name starts with a dash, it would be mistaken to be a &lt;code&gt;git&lt;&#x2F;code&gt; argument instead of a branch name. For instance &lt;strong&gt;-h&lt;&#x2F;strong&gt; could be passed to the &lt;code&gt;git&lt;&#x2F;code&gt; command as:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;shell&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-shell &quot;&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span&gt;git log --graph -h
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In reality the &lt;code&gt;rev-list&lt;&#x2F;code&gt; command is called before &lt;code&gt;log&lt;&#x2F;code&gt; and in Gitea 1.17.2 the debug output will show something like:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;2022&#x2F;10&#x2F;17 07:17:17 ...s&#x2F;web&#x2F;repo&#x2F;commit.go:124:Graph() [W] [634d017d] GetCommitGraphsCount error for generate graph exclude prs: false branches: [-h] in 1:root&#x2F;test, Will Ignore branches and try again. Underlying Error: exit status 129 - usage: git rev-list [&amp;lt;options&amp;gt;] &amp;lt;commit-id&amp;gt;... [-- &amp;lt;path&amp;gt;...]
&lt;&#x2F;span&gt;&lt;span&gt;...
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In Gitea 1.17.3 when the same command is run, the option is discarded and the debug output shows something like:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;2022&#x2F;10&#x2F;17 07:25:05 ...dules&#x2F;git&#x2F;command.go:166:Run() [E] [634d0351] git command is broken: &#x2F;usr&#x2F;bin&#x2F;git -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true -c credential.helper= rev-list --count, broken args: -h
&lt;&#x2F;span&gt;&lt;span&gt;2022&#x2F;10&#x2F;17 07:25:05 ...s&#x2F;web&#x2F;repo&#x2F;commit.go:124:Graph() [W] [634d0351] GetCommitGraphsCount error for generate graph exclude prs: false branches: [-h] in 1:root&#x2F;test, Will Ignore branches and try again. Underlying Error: git command is broken
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
</entry>
<entry xml:lang="en">
<title>1.17 breaking changes episode 2: preserving a custom gitconfig</title>
<published>2022-07-20T00:00:00+00:00</published>
<updated>2022-07-20T00:00:00+00:00</updated>
<link href="https://gna.org/blog/1-17-breaking-episode-2/" type="text/html"/>
<id>https://gna.org/blog/1-17-breaking-episode-2/</id>
<content type="html">&lt;p&gt;On June 21st, 2022 1.17.0-rc1 was published and the location of the gitconfig file moved to a new location, &lt;a href=&quot;2022-06-23-1.17-breaking-episode-1&quot;&gt;which required manual intervention&lt;&#x2F;a&gt;. This change impacted a large number of Gitea installations because the docker image tag &lt;strong&gt;latest&lt;&#x2F;strong&gt; &lt;a href=&quot;https:&#x2F;&#x2F;mastodon.online&#x2F;@hostea&#x2F;108514134565401798&quot;&gt;was set to 1.17.0-rc1&lt;&#x2F;a&gt; by accident. As a result, about 10,000 pulls per hour from the docker hub got the release candidate instead of the expected stable version.&lt;&#x2F;p&gt;
&lt;p&gt;Unfortunately moving the git home directory in 1.17.0-rc1 was implemented in way that created a security problem. The &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;20114&quot;&gt;fix that was merged in Gitea&lt;&#x2F;a&gt; to fix it requires moving the gitconfig file and was released July 19th, 2022 in 1.17.0-rc2.&lt;&#x2F;p&gt;
&lt;p&gt;This would have been a minor inconvenience if it only has an impact on adventurous people trying the release candidate in a test environment. But since all Gitea production installations based on the &lt;strong&gt;latest&lt;&#x2F;strong&gt; tag were inadvertently upgraded to 1.17.0-rc1, the admins who moved their custom .gitconfig will need to move it one more time when upgrading to 1.17.0-rc2.&lt;&#x2F;p&gt;
&lt;p&gt;In 1.17.0-rc2, a custom .gitconfig must be moved manually to the &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;config-cheat-sheet&#x2F;#git-git&quot;&gt;new git home directory&lt;&#x2F;a&gt; as follows:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Figure out the directory where &lt;code&gt;$HOME&#x2F;.gitconfig&lt;&#x2F;code&gt; must be moved by &lt;a href=&quot;https:&#x2F;&#x2F;gna.org&#x2F;blog&#x2F;gentle-introduction-to-the-doctor&#x2F;&quot;&gt;running the doctor&lt;&#x2F;a&gt;:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre data-lang=&quot;shell&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-shell &quot;&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span&gt;$ gitea --work-path &#x2F;app&#x2F;gitea -c &#x2F;data&#x2F;gitea&#x2F;conf&#x2F;app.ini doctor
&lt;&#x2F;span&gt;&lt;span&gt;[1] Check paths and basic configuration
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Configuration File Path: &amp;quot;&#x2F;data&#x2F;gitea&#x2F;conf&#x2F;app.ini&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Repository Root Path: &amp;quot;&#x2F;data&#x2F;git&#x2F;repositories&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Data Root Path: &amp;quot;&#x2F;data&#x2F;gitea&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Custom File Root Path: &amp;quot;&#x2F;data&#x2F;gitea&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Work directory: &amp;quot;&#x2F;app&#x2F;gitea&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Log Root Path: &amp;quot;&#x2F;data&#x2F;gitea&#x2F;log&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;OK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Copy the &lt;code&gt;$HOME&#x2F;.gitconfig&lt;&#x2F;code&gt; file to the &lt;strong&gt;Data Root Path&lt;&#x2F;strong&gt;&#x2F;home (which is &lt;code&gt;&#x2F;data&#x2F;gitea&#x2F;home&lt;&#x2F;code&gt; in the example above).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
</entry>
<entry xml:lang="en">
<title>Get a Gitea instance with CI at Gna!</title>
<published>2022-07-10T00:00:00+00:00</published>
<updated>2022-07-10T00:00:00+00:00</updated>
<link href="https://gna.org/blog/experimental/" type="text/html"/>
<id>https://gna.org/blog/experimental/</id>
<content type="html">&lt;p&gt;Hosting a Gitea instance on Gna! is now possible (but still experimental). It is meant to be a minimum viable product: anyone can &lt;a href=&quot;https:&#x2F;&#x2F;hosteadashboard.gna.org&quot;&gt;create a new dedicated Gitea instance&lt;&#x2F;a&gt; within minutes and pay for it on a monthly basis with a credit card. It includes a dedicated CI based on &lt;a href=&quot;https:&#x2F;&#x2F;woodpecker-ci.org&#x2F;&quot;&gt;Woodpecker&lt;&#x2F;a&gt;. The smallest instance costs 10€ per month (2GB RAM, 10GB disk, 1CPU) and will be a good fit for a freelance up to a team of five people but bigger instances are also available if more RAM, CPU or disk is required.&lt;&#x2F;p&gt;
&lt;video width=&quot;600&quot; controls&gt;
&lt;source src=&quot;https:&#x2F;&#x2F;cloud.forgefriends.org&#x2F;s&#x2F;xXLcYpsE469tJEj&#x2F;download?path=&amp;files=hostea-screencast-vm-create.mp4&quot; type=&quot;video&#x2F;mp4&quot; &#x2F;&gt;
&lt;&#x2F;video&gt;
&lt;p&gt;The service is 100% infrastructure as code, published as &lt;a href=&quot;https:&#x2F;&#x2F;lab.enough.community&#x2F;main&#x2F;infrastructure&#x2F;-&#x2F;tree&#x2F;9e18ebbf675c8a65d1585d20b4cf6295af6e52ed&#x2F;playbooks&#x2F;hosteadashboard&quot;&gt;Ansible playbooks within Enough&lt;&#x2F;a&gt;. It can be self-hosted on bare metal (with &lt;a href=&quot;https:&#x2F;&#x2F;libvirt.org&#x2F;&quot;&gt;libvirt&lt;&#x2F;a&gt;) or in the cloud (with &lt;a href=&quot;https:&#x2F;&#x2F;www.openstack.org&#x2F;&quot;&gt;OpenStack&lt;&#x2F;a&gt;): follow the &lt;a href=&quot;https:&#x2F;&#x2F;enough-community.readthedocs.io&#x2F;en&#x2F;latest&#x2F;introduction.html#quick-start&quot;&gt;quick start&lt;&#x2F;a&gt;, configure playbooks for &lt;a href=&quot;https:&#x2F;&#x2F;enough-community.readthedocs.io&#x2F;en&#x2F;latest&#x2F;services&#x2F;hostea.html&quot;&gt;hostea&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;enough-community.readthedocs.io&#x2F;en&#x2F;latest&#x2F;services&#x2F;hosteadashboard.html&quot;&gt;the dashboard&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The organization supporting Gna! is a &lt;a href=&quot;https:&#x2F;&#x2F;forum.gna.org&#x2F;c&#x2F;governance-and-decisions&#x2F;7&quot;&gt;horizontal collective&lt;&#x2F;a&gt; of individuals and organizations. The &lt;a href=&quot;https:&#x2F;&#x2F;forum.gna.org&#x2F;t&#x2F;decision-revenue-sharing-model&#x2F;92&quot;&gt;revenue sharing model&lt;&#x2F;a&gt; is set to dedicate 25% of the income (more than the profits) to help the Free Software projects Hostea depends on such as Gitea, Enough, Django etc.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-origin&quot;&gt;The origin&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-origin&quot; aria-label=&quot;Anchor link for: the-origin&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;In February 2022 the project of running a dedicated Gitea hosting service was &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;a-gitea-hosting-service-under-the-umbrella-of-the-gitea-project&#x2F;4692&quot;&gt;proposed to the Gitea project&lt;&#x2F;a&gt; and other organizations and &lt;a href=&quot;https:&#x2F;&#x2F;blog.dachary.org&#x2F;2022&#x2F;02&#x2F;16&#x2F;project-plans-for-a-hosted-gitea-online-service&#x2F;&quot;&gt;plans were drafted&lt;&#x2F;a&gt;. After a month of discussions it turned out to not be a &lt;a href=&quot;https:&#x2F;&#x2F;blog.dachary.org&#x2F;2022&#x2F;03&#x2F;11&#x2F;the-inconclusive-story-of-four-failed-project-offers&#x2F;&quot;&gt;good match for any of them&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;It was suggested to create a new project from scratch instead of joining an existing organization. However, in order to be sustainable, a hosting service needs customers willing to pay for the service. And nobody had that kind of skill. It was therefore decided that to terminate the project: there is no point is creating a technical stack that&#x27;s not going to be used by anyone.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;a-technical-stack-with-no-users&quot;&gt;A technical stack with no users&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-technical-stack-with-no-users&quot; aria-label=&quot;Anchor link for: a-technical-stack-with-no-users&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;The most common mistake technical people do when creating a new piece of software is to overlook the fact that they have absolutely no idea how to let their intended user base know about it. Maybe the reason it happens so often is because it is very difficult to resist the urge of creating something. Because that&#x27;s what technical people love to do: create things, even when they have no clue if it can be used.&lt;&#x2F;p&gt;
&lt;p&gt;It took no longer than two weeks for the people involved in Gna! to decide to build the technical stack to run hostea instead of being reasonable and give up. It was just too tempting.&lt;&#x2F;p&gt;
&lt;p&gt;To keep the madness contained and enjoyable, it was decided to set a deadline to July 1st and to &lt;a href=&quot;https:&#x2F;&#x2F;gitea.gna.org&#x2F;Hostea&#x2F;july-mvp&#x2F;issues&quot;&gt;define precise and realistic technical goals&lt;&#x2F;a&gt;. It turned out to be an enjoyable experience: everyone learned a lot in the process and the outcome is something that can be reproduced. Most MVPs are a brittle pile of hacks designed to last a few weeks and be thrown away. But since a primary goal of the project was to create something self-hostable, it had to implement that feature and therefore be reproducible.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;a-horizontal-collective-with-a-revenue-sharing-model&quot;&gt;A horizontal collective with a revenue sharing model&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-horizontal-collective-with-a-revenue-sharing-model&quot; aria-label=&quot;Anchor link for: a-horizontal-collective-with-a-revenue-sharing-model&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Another goal of Gna! is to deploy federated forges, even at an experimental stage. Instead of creating a centralized organization to support Gna!, it was decided to create &lt;a href=&quot;https:&#x2F;&#x2F;forum.gna.org&#x2F;c&#x2F;governance-and-decisions&#x2F;7&quot;&gt;horizontal collective&lt;&#x2F;a&gt;. It feels like a contradiction for a project committed to decentralization to be governed by a centralized organization.&lt;&#x2F;p&gt;
&lt;p&gt;The collective is composed of individuals and organizations but, unlike exclusively volunteer based Free Software projects, it is for profit. Customers rent Gitea instances by the month and the income is used to pay for expenses. There is however a difficulty: by nature a horizontal collective cannot be incorporated as it would create a level of hierarchy. The &lt;a href=&quot;https:&#x2F;&#x2F;forum.gna.org&#x2F;t&#x2F;decision-revenue-sharing-model&#x2F;92&quot;&gt;revenue sharing model&lt;&#x2F;a&gt; had to be set as an informal agreement between members where one of them receives the income and distributes it to the others, depending on their Gna! related expenses.&lt;&#x2F;p&gt;
&lt;p&gt;It also requires that 25% of the income (not the profits) is dedicated to help the Free Software projects that Gna! depends on such as Gitea, Enough, Django etc. It can be via a donation, by upstreaming a bug fix or any kind of work that is beneficial to the dependency.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;dedicated-to-forge-federation&quot;&gt;Dedicated to forge federation&lt;a class=&quot;zola-anchor&quot; href=&quot;#dedicated-to-forge-federation&quot; aria-label=&quot;Anchor link for: dedicated-to-forge-federation&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;In the spirit of dogfooding, the people who created the technical stack of Gna! will use it for themselves on a daily basis. Since the focus of the authors is on &lt;a href=&quot;https:&#x2F;&#x2F;forgefriends.org&#x2F;blog&#x2F;2022&#x2F;06&#x2F;30&#x2F;2022-06-state-forge-federation&#x2F;&quot;&gt;forge federation&lt;&#x2F;a&gt;, they will add federation support in Hostea. This will be their primary motivation to improve and maintain Hostea: it is the only hosting platform where this can happen.&lt;&#x2F;p&gt;
</content>
</entry>
<entry xml:lang="en">
<title>1.17 breaking changes episode 1: preserving a custom gitconfig</title>
<published>2022-06-22T00:00:00+00:00</published>
<updated>2022-06-22T00:00:00+00:00</updated>
<link href="https://gna.org/blog/1-17-breaking-episode-1/" type="text/html"/>
<id>https://gna.org/blog/1-17-breaking-episode-1/</id>
<content type="html">&lt;p&gt;Before version 1.17, when Gitea needed to change the &lt;a href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-config&quot;&gt;git configuration&lt;&#x2F;a&gt;, it modified the &lt;code&gt;$HOME&#x2F;.gitconfig&lt;&#x2F;code&gt; file. For instance it would &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;release&#x2F;v1.16&#x2F;modules&#x2F;git&#x2F;git.go#L174-L177&quot;&gt;set core.quotePath to false&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ini&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-ini &quot;&gt;&lt;code class=&quot;language-ini&quot; data-lang=&quot;ini&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[core]
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;quotePath &lt;&#x2F;span&gt;&lt;span&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;false
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When installing Gitea &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;install-with-docker&#x2F;&quot;&gt;from docker&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;install-with-docker-rootless&#x2F;&quot;&gt;rootless&lt;&#x2F;a&gt; or even &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;install-from-binary&#x2F;&quot;&gt;from binary&lt;&#x2F;a&gt; this &lt;code&gt;$HOME&#x2F;.gitconfig&lt;&#x2F;code&gt; file belongs to a user that is &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;install-from-binary&#x2F;#prepare-environment&quot;&gt;dedicated to Gitea&lt;&#x2F;a&gt; and not used by anyone else.&lt;&#x2F;p&gt;
&lt;p&gt;However, if an Gitea installation was done differently and &lt;code&gt;$HOME&#x2F;.gitconfig&lt;&#x2F;code&gt; has been customized because it is shared by a user or another application, there is a good chance that manual modifications were done such as:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;ini&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-ini &quot;&gt;&lt;code class=&quot;language-ini&quot; data-lang=&quot;ini&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[user]
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;name &lt;&#x2F;span&gt;&lt;span&gt;= Jane Doe
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;email &lt;&#x2F;span&gt;&lt;span&gt;= jane&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;@doe&lt;&#x2F;span&gt;&lt;span&gt;.com
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It is also possible that the file was modified manually by the Gitea admin for other reasons. In both there is a &lt;strong&gt;potential for breakage when upgrading to Gitea &amp;gt;= 1.17 because the location of the file changed&lt;&#x2F;strong&gt;. It must be moved manually to the new location as follows:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Figure out the directory where &lt;code&gt;$HOME&#x2F;.gitconfig&lt;&#x2F;code&gt; must be moved by &lt;a href=&quot;https:&#x2F;&#x2F;gna.org&#x2F;blog&#x2F;gentle-introduction-to-the-doctor&#x2F;&quot;&gt;running the doctor&lt;&#x2F;a&gt;:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre data-lang=&quot;shell&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-shell &quot;&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span&gt;$ gitea --work-path &#x2F;app&#x2F;gitea -c &#x2F;data&#x2F;gitea&#x2F;conf&#x2F;app.ini doctor
&lt;&#x2F;span&gt;&lt;span&gt;[1] Check paths and basic configuration
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Configuration File Path: &amp;quot;&#x2F;data&#x2F;gitea&#x2F;conf&#x2F;app.ini&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Repository Root Path: &amp;quot;&#x2F;data&#x2F;git&#x2F;repositories&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Data Root Path: &amp;quot;&#x2F;data&#x2F;gitea&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Custom File Root Path: &amp;quot;&#x2F;data&#x2F;gitea&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Work directory: &amp;quot;&#x2F;app&#x2F;gitea&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; - [I] Log Root Path: &amp;quot;&#x2F;data&#x2F;gitea&#x2F;log&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;OK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Copy the &lt;code&gt;$HOME&#x2F;.gitconfig&lt;&#x2F;code&gt; file to the &lt;strong&gt;Repository Root Path&lt;&#x2F;strong&gt; (which is &lt;code&gt;&#x2F;data&#x2F;git&#x2F;repositories&lt;&#x2F;code&gt; in the example above).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The reason why this breaking change was introduced is to workaround &lt;a href=&quot;https:&#x2F;&#x2F;gna.org&#x2F;blog&#x2F;unsafe-repository-is-owned-by-someone-else&#x2F;&quot;&gt;a rare problem&lt;&#x2F;a&gt; impacting Gitea installations relying on networked volumes.&lt;&#x2F;p&gt;
</content>
</entry>
<entry xml:lang="en">
<title>[tutorial] A gentle introduction to the gitea doctor</title>
<published>2022-06-14T00:00:00+00:00</published>
<updated>2022-06-14T00:00:00+00:00</updated>
<link href="https://gna.org/blog/gentle-introduction-to-the-doctor/" type="text/html"/>
<id>https://gna.org/blog/gentle-introduction-to-the-doctor/</id>
<content type="html">&lt;p&gt;While helping people with their upgrades &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;migration-from-1-2-to-1-16-8&#x2F;5309&quot;&gt;in the Gitea forum&lt;&#x2F;a&gt; or &lt;a href=&quot;https:&#x2F;&#x2F;forum.gna.org&#x2F;t&#x2F;gitea-upgrade-from-1-14-1-to-1-16-8&#x2F;90&quot;&gt;at the Gna! clinic&lt;&#x2F;a&gt;, I realized that few Gitea admins know about the &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;command-line&#x2F;#doctor&quot;&gt;&lt;code&gt;gitea doctor&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; command and decided to write this blog post as a gentle introduction.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;an-apple-a-day-keeps-the-doctor-away&quot;&gt;An apple a day keeps the doctor away&lt;a class=&quot;zola-anchor&quot; href=&quot;#an-apple-a-day-keeps-the-doctor-away&quot; aria-label=&quot;Anchor link for: an-apple-a-day-keeps-the-doctor-away&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Or in our case, Gitea versions &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;v1.11.5&#x2F;cmd&#x2F;doctor.go&quot;&gt;below 1.11.5&lt;&#x2F;a&gt;. Since then, the &lt;code&gt;gitea doctor&lt;&#x2F;code&gt; is available and is designed to run against a specific Gitea version. It would not be a good idea to try to run the doctor from Gitea 1.16 to verify the sanity of a Gitea 1.2 instance: it will be confused by how the database is organized and a number of other details. Historical fun fact: the &lt;code&gt;gitea doctor&lt;&#x2F;code&gt; was backported to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;v1.10.5&#x2F;cmd&#x2F;doctor.go&quot;&gt;Gitea 1.10.5&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;v1.10.6&#x2F;cmd&#x2F;doctor.go&quot;&gt;Gitea 1.10.6&lt;&#x2F;a&gt; and may be of help if you run this particular version and are facing the problem that motivated the backport.&lt;&#x2F;p&gt;
&lt;p&gt;With each version &lt;code&gt;gitea doctor&lt;&#x2F;code&gt; improves and gains new capabilities. For instance, in Gitea 1.17 it becomes aware of &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19731&quot;&gt;orphaned pull requests&lt;&#x2F;a&gt; and is able to fix them. If such a problem exists in Gitea 1.16, it does not know about it.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;calling-the-doctor&quot;&gt;Calling the doctor&lt;a class=&quot;zola-anchor&quot; href=&quot;#calling-the-doctor&quot; aria-label=&quot;Anchor link for: calling-the-doctor&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;In the following, examples are based on a Gitea 1.16.8 instance you can run as follows:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker run&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --name&lt;&#x2F;span&gt;&lt;span&gt; gitea&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span&gt; 3000:3000&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;span&gt; GITEA__security__INSTALL_LOCK=true&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -d&lt;&#x2F;span&gt;&lt;span&gt; gitea&#x2F;gitea:1.16.8-rootless
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea gitea admin user create&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --admin --username&lt;&#x2F;span&gt;&lt;span&gt; root&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --password&lt;&#x2F;span&gt;&lt;span&gt; admin1234&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --email&lt;&#x2F;span&gt;&lt;span&gt; root@example.com
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea mkdir &#x2F;var&#x2F;lib&#x2F;gitea&#x2F;data&#x2F;log
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And then you can go to the &lt;a href=&quot;https:&#x2F;&#x2F;127.0.0.1:3000&#x2F;&quot;&gt;web interface&lt;&#x2F;a&gt; to create a &lt;code&gt;test&lt;&#x2F;code&gt; repository, with an initial &lt;code&gt;README.md&lt;&#x2F;code&gt; file. When this is done the doctor can be called as follows:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea gitea doctor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --all
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[1]&lt;&#x2F;span&gt;&lt;span&gt; Check paths and basic configuration
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Configuration File Path: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;etc&#x2F;gitea&#x2F;app.ini&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Repository Root Path: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;var&#x2F;lib&#x2F;gitea&#x2F;git&#x2F;repositories&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Data Root Path: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;var&#x2F;lib&#x2F;gitea&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Custom File Root Path: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;var&#x2F;lib&#x2F;gitea&#x2F;custom&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Work directory: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;var&#x2F;lib&#x2F;gitea&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Log Root Path: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;var&#x2F;lib&#x2F;gitea&#x2F;data&#x2F;log&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[2]&lt;&#x2F;span&gt;&lt;span&gt; Check if there is garbage storage files
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[3]&lt;&#x2F;span&gt;&lt;span&gt; Check Database Version
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[4]&lt;&#x2F;span&gt;&lt;span&gt; Check consistency of database
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[5]&lt;&#x2F;span&gt;&lt;span&gt; Check if user with wrong type exist
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[6]&lt;&#x2F;span&gt;&lt;span&gt; Check if OpenSSH authorized_keys file is up-to-date
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[7]&lt;&#x2F;span&gt;&lt;span&gt; Check if SCRIPT_TYPE is available
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; ScriptType bash is on the current PATH at &#x2F;bin&#x2F;bash
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[8]&lt;&#x2F;span&gt;&lt;span&gt; Check if hook files are up-to-date and executable
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[9]&lt;&#x2F;span&gt;&lt;span&gt; Recalculate Stars number for all user
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[10]&lt;&#x2F;span&gt;&lt;span&gt; Check old archives
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; 0 old archives in repository need to be deleted
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[11]&lt;&#x2F;span&gt;&lt;span&gt; Enable push options
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Checked 1 repositories, 0 need updates.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[12]&lt;&#x2F;span&gt;&lt;span&gt; Check for incorrectly dumped repo_units (See &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;#16961)
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;W&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Found 0 broken repo_units
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[13]&lt;&#x2F;span&gt;&lt;span&gt; Recalculate merge bases
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;W&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; 0 PRs with incorrect mergebases of 0 PRs total in 1 repos
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[14]&lt;&#x2F;span&gt;&lt;span&gt; Check git-daemon-export-ok files
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;I&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Checked 1 repositories, 0 need updates.
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;what-does-the-doctor-know&quot;&gt;What does the doctor know?&lt;a class=&quot;zola-anchor&quot; href=&quot;#what-does-the-doctor-know&quot; aria-label=&quot;Anchor link for: what-does-the-doctor-know&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Although the &lt;code&gt;doctor&lt;&#x2F;code&gt; can be compared to &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fsck&quot;&gt;fsck(8)&lt;&#x2F;a&gt;, it does not know everything. It took decades for &lt;code&gt;fsck&lt;&#x2F;code&gt; to become the ultimate authority on finding problems on file systems and reliably fixing them without losing data. Nowadays, only a handful of people in the world are brave enough to manually attempt a file system recovery when &lt;code&gt;fsck&lt;&#x2F;code&gt; cannot recover from a data loss.&lt;&#x2F;p&gt;
&lt;p&gt;The first &lt;code&gt;doctor&lt;&#x2F;code&gt; version is two years old and Gitea admins are still routinely running SQL queries against the database or moving files around when trying to figure out why a Gitea instance is not behaving as it should. It is however worth checking if the doctor does not already have a solution by listing all it can do:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea gitea doctor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --list
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;Default&lt;&#x2F;span&gt;&lt;span&gt; Name Title
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt; paths Check paths and basic configuration
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;storages&lt;&#x2F;span&gt;&lt;span&gt; Check if there is garbage storage files
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt; check-db-version Check Database Version
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;check-db-consistency&lt;&#x2F;span&gt;&lt;span&gt; Check consistency of database
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt; check-user-type Check if user with wrong type exist
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt; authorized-keys Check if OpenSSH authorized_keys file is up-to-date
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;script-type&lt;&#x2F;span&gt;&lt;span&gt; Check if SCRIPT_TYPE is available
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;hooks&lt;&#x2F;span&gt;&lt;span&gt; Check if hook files are up-to-date and executable
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;recalculate-stars-number&lt;&#x2F;span&gt;&lt;span&gt; Recalculate Stars number for all user
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;check-old-archives&lt;&#x2F;span&gt;&lt;span&gt; Check old archives
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;enable-push-options&lt;&#x2F;span&gt;&lt;span&gt; Enable push options
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;fix-broken-repo-units&lt;&#x2F;span&gt;&lt;span&gt; Check for incorrectly dumped repo_units (See &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;#16961)
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;recalculate-merge-bases&lt;&#x2F;span&gt;&lt;span&gt; Recalculate merge bases
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;check-git-daemon-export-ok&lt;&#x2F;span&gt;&lt;span&gt; Check git-daemon-export-ok files
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And then call the &lt;code&gt;check&lt;&#x2F;code&gt; that looks interesting:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea gitea doctor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --run&lt;&#x2F;span&gt;&lt;span&gt; authorized-keys
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[1]&lt;&#x2F;span&gt;&lt;span&gt; Check if OpenSSH authorized_keys file is up-to-date
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The challenge is to figure out which &lt;code&gt;check&lt;&#x2F;code&gt; does what and at the moment the best source of information is ... &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;tree&#x2F;v1.16.8&quot;&gt;the sources&lt;&#x2F;a&gt; themselves. The &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;v1.16.8&#x2F;cmd&#x2F;doctor.go&quot;&gt;doctor.go&lt;&#x2F;a&gt; command is the entry point and &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;tree&#x2F;v1.16.8&#x2F;modules&#x2F;doctor&quot;&gt;the doctor directory&lt;&#x2F;a&gt; contains the rest.&lt;&#x2F;p&gt;
&lt;p&gt;Some &lt;code&gt;checks&lt;&#x2F;code&gt; are straightforward to understand, even if you do not know Go, such as &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;v1.16.8&#x2F;modules&#x2F;doctor&#x2F;authorizedkeys.go&quot;&gt;the authorized-keys check&lt;&#x2F;a&gt;. Others are much more involved and your best chance is to &lt;a href=&quot;https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gitea:matrix.org&quot;&gt;ask the Gitea chatroom&lt;&#x2F;a&gt; for help.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;is-it-going-to-hurt&quot;&gt;Is it going to hurt?&lt;a class=&quot;zola-anchor&quot; href=&quot;#is-it-going-to-hurt&quot; aria-label=&quot;Anchor link for: is-it-going-to-hurt&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;By default the doctor (very much like &lt;code&gt;fsck -N&lt;&#x2F;code&gt;) only performs non destructive checks and displays diagnostics, with an indication of how serious the problem is. In the example above, there only are lines with &lt;strong&gt;[I]&lt;&#x2F;strong&gt; (which indicates an information) and &lt;strong&gt;[W]&lt;&#x2F;strong&gt; which indicates a warning that can be ignored but may be worth looking into. Those two warnings are actually just informational and should be labelled as &lt;strong&gt;[I]&lt;&#x2F;strong&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19836&quot;&gt;which has been fixed&lt;&#x2F;a&gt; in a more recent version of the doctor.&lt;&#x2F;p&gt;
&lt;p&gt;Now let&#x27;s do something bad: remove the permissions from a hook in our repository:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -x&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;var&#x2F;lib&#x2F;gitea&#x2F;git&#x2F;repositories&#x2F;root&#x2F;test.git&#x2F;hooks&#x2F;post-receive
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Run the doctor with the &lt;code&gt;check&lt;&#x2F;code&gt; supposed to find that out:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea gitea doctor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --run&lt;&#x2F;span&gt;&lt;span&gt; hooks
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[1]&lt;&#x2F;span&gt;&lt;span&gt; Check if hook files are up-to-date and executable
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;W&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; old hook file &#x2F;var&#x2F;lib&#x2F;gitea&#x2F;git&#x2F;repositories&#x2F;root&#x2F;test.git&#x2F;hooks&#x2F;post-receive is not executable
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Ask it to fix this with the &lt;code&gt;--fix&lt;&#x2F;code&gt; flag:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea gitea doctor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --run&lt;&#x2F;span&gt;&lt;span&gt; hooks&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --fix
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[1]&lt;&#x2F;span&gt;&lt;span&gt; Check if hook files are up-to-date and executable
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;W&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; Regenerated hooks for root&#x2F;test
&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;- &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;W&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; old hook file &#x2F;var&#x2F;lib&#x2F;gitea&#x2F;git&#x2F;repositories&#x2F;root&#x2F;test.git&#x2F;hooks&#x2F;post-receive is not executable
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And run it one last time to check all is well:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt; docker exec gitea gitea doctor&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; --run&lt;&#x2F;span&gt;&lt;span&gt; hooks
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;[1]&lt;&#x2F;span&gt;&lt;span&gt; Check if hook files are up-to-date and executable
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;OK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Even when the doctor is unable to fix a problem, it can help by showing extensive debug output which can be found, by default, in the &lt;code&gt;doctor.log&lt;&#x2F;code&gt; file in the directory from which it runs. Or it can be displayed on the standard output with &lt;code&gt;--log-file -&lt;&#x2F;code&gt;, which is most convenient when running in docker.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;going-further&quot;&gt;Going further&lt;a class=&quot;zola-anchor&quot; href=&quot;#going-further&quot; aria-label=&quot;Anchor link for: going-further&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;If that was helpful to you, I would very much appreciate if you &lt;a href=&quot;https:&#x2F;&#x2F;mastodon.online&#x2F;@dachary&quot;&gt;send me a message on Mastodon&lt;&#x2F;a&gt;. It will encourage me to write more blog posts to share what I learn about Gitea. Even better: you could &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pulls&quot;&gt;send a pull request&lt;&#x2F;a&gt; to improve the doctor and help it mature.&lt;&#x2F;p&gt;
</content>
</entry>
<entry xml:lang="en">
<title>[solved] Zombies created by Gitea</title>
<published>2022-06-04T00:00:00+00:00</published>
<updated>2022-06-04T00:00:00+00:00</updated>
<link href="https://gna.org/blog/zombies-part-2/" type="text/html"/>
<id>https://gna.org/blog/zombies-part-2/</id>
<content type="html">&lt;p&gt;Gitea can &lt;a href=&quot;&#x2F;blog&#x2F;zombies&quot;&gt;create zombies&lt;&#x2F;a&gt;, for instance if a Git mirror takes too long. When updating a mirror, Gitea relies on the &lt;code&gt;git remote update&lt;&#x2F;code&gt; command which creates a child process, &lt;code&gt;git-remote-https&lt;&#x2F;code&gt;, to fetch data from the remote repository. Gitea has an internal timeout that will kill the child process (e.g. &lt;code&gt;git remote update&lt;&#x2F;code&gt;) when it takes too long but will not kill the grandchild. This grandchild will become an orphan and run forever or until its own timeout expires, which is about two minutes on git version 2.25.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;$ time git clone https:&#x2F;&#x2F;4.4.4.4
&lt;&#x2F;span&gt;&lt;span&gt;Clonage dans &amp;#39;4.4.4.4&amp;#39;...
&lt;&#x2F;span&gt;&lt;span&gt;fatal: impossible d&amp;#39;accéder à &amp;#39;https:&#x2F;&#x2F;4.4.4.4&#x2F;&amp;#39;: Failed to connect to 4.4.4.4 port 443: Connexion terminée par expiration du délai d&amp;#39;attente
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;real 2m9,753s
&lt;&#x2F;span&gt;&lt;span&gt;user 0m0,001s
&lt;&#x2F;span&gt;&lt;span&gt;sys 0m0,009s
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As explained in the &lt;a href=&quot;&#x2F;blog&#x2F;zombies&#x2F;#killing-a-child-process-and-all-its-children&quot;&gt;diagnostic blog post regarding Gitea zombies&lt;&#x2F;a&gt; there fortunately is a very simple way to avoid this by making sure each Gitea child is a &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Process_group&quot;&gt;process group leader&lt;&#x2F;a&gt;. That first step was &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19865&quot;&gt;introduced in Gitea 1.17&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19865&quot;&gt;backported to Gitea 1.16.9&lt;&#x2F;a&gt;. The actual bug fix can now be implemented.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;using-negative-process-id-to-kill-children&quot;&gt;Using negative process id to kill children&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-negative-process-id-to-kill-children&quot; aria-label=&quot;Anchor link for: using-negative-process-id-to-kill-children&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;When Gitea timeout on a child, it relies on &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;blob&#x2F;f8a53df314e4af8cd350eedb0dae77d4c4fc30d0&#x2F;src&#x2F;os&#x2F;exec&#x2F;exec.go#L650&quot;&gt;os.Process.Kill&lt;&#x2F;a&gt; which translates into a using the kill(2) system call to send a SIGKILL signal to unconditionally terminate it: &lt;code&gt;kill(pid, SIGKILL)&lt;&#x2F;code&gt;. Using a negative pid with &lt;code&gt;kill(-pid, SIGKILL)&lt;&#x2F;code&gt; will also terminate all processes created by Gitea&#x27;s child, without Gitea knowing when or why they were created. From the kill(2) manual page:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;If pid is less than -1, then sig is sent to every process in the process group whose ID is -pid.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Which is implemented as follows in the &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;friendlyforgeformat&#x2F;gofff&#x2F;-&#x2F;blob&#x2F;a9603c7cc934fccd4382b7f4309b75c852742480&#x2F;util&#x2F;exec.go#L130&quot;&gt;Friendly Forge Format library&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;not-using-the-default-go-commandcontext&quot;&gt;Not using the default Go CommandContext&lt;a class=&quot;zola-anchor&quot; href=&quot;#not-using-the-default-go-commandcontext&quot; aria-label=&quot;Anchor link for: not-using-the-default-go-commandcontext&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Since &lt;a href=&quot;https:&#x2F;&#x2F;pkg.go.dev&#x2F;os&#x2F;exec#CommandContext&quot;&gt;CommandContext&lt;&#x2F;a&gt; does not allow to send a signal to the negative pid of the child process, it has to be implemented by Gitea itself, in a way that is similar to how the &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;friendlyforgeformat&#x2F;gofff&#x2F;-&#x2F;blob&#x2F;a9603c7cc934fccd4382b7f4309b75c852742480&#x2F;util&#x2F;exec.go#L75-82&quot;&gt;Friendly Forge Format library&lt;&#x2F;a&gt; does it:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt; ctxErr := watchCtx(ctx, cmd.Process.Pid)
&lt;&#x2F;span&gt;&lt;span&gt; err = cmd.Wait()
&lt;&#x2F;span&gt;&lt;span&gt; interruptErr := &amp;lt;-ctxErr
&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;&#x2F; If cmd.Wait returned an error, prefer that.
&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;&#x2F; Otherwise, report any error from the interrupt goroutine.
&lt;&#x2F;span&gt;&lt;span&gt; if interruptErr != nil &amp;amp;&amp;amp; err == nil {
&lt;&#x2F;span&gt;&lt;span&gt; err = interruptErr
&lt;&#x2F;span&gt;&lt;span&gt; }
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;testing-the-bug-is-fixed-and-stays-fixed&quot;&gt;Testing the bug is fixed and stays fixed&lt;a class=&quot;zola-anchor&quot; href=&quot;#testing-the-bug-is-fixed-and-stays-fixed&quot; aria-label=&quot;Anchor link for: testing-the-bug-is-fixed-and-stays-fixed&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Long standing bugs that are difficult to reproduce manually such as this one require robust testing to ensure that:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;the diagnostic identifying the root cause is correct&lt;&#x2F;li&gt;
&lt;li&gt;the bug fix works&lt;&#x2F;li&gt;
&lt;li&gt;it does not resurface insidiously because of a subtle regression introduce years later&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;It is easy to implement as can be seen in the &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;friendlyforgeformat&#x2F;gofff&#x2F;-&#x2F;blob&#x2F;a9603c7cc934fccd4382b7f4309b75c852742480&#x2F;util&#x2F;exec_test.go#L44-76&quot;&gt;Friendly Forge Format library&lt;&#x2F;a&gt;. In a nutshell:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;friendlyforgeformat&#x2F;gofff&#x2F;-&#x2F;blob&#x2F;a9603c7cc934fccd4382b7f4309b75c852742480&#x2F;util&#x2F;exec_test.go#L53&quot;&gt;git clone https:&#x2F;&#x2F;4.4.4.4&lt;&#x2F;a&gt; which will hang because of firewall rules&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;friendlyforgeformat&#x2F;gofff&#x2F;-&#x2F;blob&#x2F;a9603c7cc934fccd4382b7f4309b75c852742480&#x2F;util&#x2F;exec_test.go#L60-65&quot;&gt;wait for the git-remote-https&lt;&#x2F;a&gt; grandchild process to be spawned&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;friendlyforgeformat&#x2F;gofff&#x2F;-&#x2F;blob&#x2F;a9603c7cc934fccd4382b7f4309b75c852742480&#x2F;util&#x2F;exec_test.go#L67-68&quot;&gt;cancel the context and wait for the goroutine to terminate&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;friendlyforgeformat&#x2F;gofff&#x2F;-&#x2F;blob&#x2F;a9603c7cc934fccd4382b7f4309b75c852742480&#x2F;util&#x2F;exec_test.go#L70-75&quot;&gt;verify the git-remote-https is killed&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;And with that... no more zombies!&lt;&#x2F;p&gt;
</content>
</entry>
<entry xml:lang="en">
<title>[diagnostic] Zombies created by Gitea</title>
<published>2022-06-02T00:00:00+00:00</published>
<updated>2022-06-02T00:00:00+00:00</updated>
<link href="https://gna.org/blog/zombies/" type="text/html"/>
<id>https://gna.org/blog/zombies/</id>
<content type="html">&lt;p&gt;The first &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;issues&#x2F;3242&quot;&gt;issue about zombie processes&lt;&#x2F;a&gt; created by Gitea was reported in 2017 and &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;issues&#x2F;13987&quot;&gt;resurfaced&lt;&#x2F;a&gt; on a &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;issues&#x2F;19077&quot;&gt;regular basis&lt;&#x2F;a&gt;. Although it does not look pretty, zombie processes are leftovers that do not consume resources and never caused any kind of harm. Here is one scenario that will create a zombie:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Gitea updates a mirror by spawning the process &lt;code&gt;git remote update&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;git remote update&lt;&#x2F;code&gt; spawns yet another process, &lt;code&gt;git fetch&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;git fetch&lt;&#x2F;code&gt; is stuck, for instance because of network problems, and Gitea eventually times out&lt;&#x2F;li&gt;
&lt;li&gt;Gitea kill the process &lt;code&gt;git remote update&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;When killed &lt;code&gt;git remote update&lt;&#x2F;code&gt; does not kill its own child and &lt;code&gt;git fetch&lt;&#x2F;code&gt; becomes an orphaned process which keeps running&lt;&#x2F;li&gt;
&lt;li&gt;When &lt;code&gt;git fetch&lt;&#x2F;code&gt; eventually completes it becomes a zombie because its original parent is no longer around to wait on it&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;pid-1-process-and-waiting-on-orphans&quot;&gt;PID 1 process and waiting on orphans&lt;a class=&quot;zola-anchor&quot; href=&quot;#pid-1-process-and-waiting-on-orphans&quot; aria-label=&quot;Anchor link for: pid-1-process-and-waiting-on-orphans&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;This scenario is not unique to Gitea and it is such a common pattern that safeguards have been implemented to mitigate the proliferation of zombies. Orphaned process are automatically attached to the process with PID 1, which is expected to wait on every process, whether it created them or not. When Gitea is installed from binary on GNU&#x2F;Linux this is &lt;code&gt;&#x2F;bin&#x2F;init&lt;&#x2F;code&gt; and when Gitea runs from the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;6171ea7d318c0ca8714bc6efd6a97ea4b495eb6d&#x2F;Dockerfile&quot;&gt;default docker image&lt;&#x2F;a&gt; this is &lt;code&gt;s6&lt;&#x2F;code&gt;: they will both wait on orphaned processes and there won&#x27;t be any zombies.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;what-if-gitea-is-the-only-running-process&quot;&gt;What if Gitea is the only running process?&lt;a class=&quot;zola-anchor&quot; href=&quot;#what-if-gitea-is-the-only-running-process&quot; aria-label=&quot;Anchor link for: what-if-gitea-is-the-only-running-process&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;But when Gitea runs from the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;6171ea7d318c0ca8714bc6efd6a97ea4b495eb6d&#x2F;Dockerfile.rootless&quot;&gt;rootless docker image&lt;&#x2F;a&gt;, Gitea is the only process running in the container. Orphaned processes will have Gitea as a parent but will not wait on them and they will stay in a zombie state forever. To reproduce this problem in a minimal way:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;$ docker run --name gitea -p 8080:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea&#x2F;gitea:1.16.8-rootless
&lt;&#x2F;span&gt;&lt;span&gt;$ docker exec --user 1000 gitea gitea admin user create --admin --username root --password admin1234 --email root@example.com
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;git&lt;&#x2F;code&gt; command can then be replaced with a script that waits forever:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;$ ( echo -e &amp;#39;#!&#x2F;bin&#x2F;bash\nsleep infinity&amp;#39; ) | docker exec -i --user root gitea tee &#x2F;usr&#x2F;bin&#x2F;git
&lt;&#x2F;span&gt;&lt;span&gt;$ docker exec --user root gitea chmod +x &#x2F;usr&#x2F;bin&#x2F;git
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Trying to create a repository from the web interface will create the conditions for a zombie to show:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;$ docker exec gitea ps -o ppid,pid,comm,args
&lt;&#x2F;span&gt;&lt;span&gt;PPID PID COMMAND COMMAND
&lt;&#x2F;span&gt;&lt;span&gt; 0 1 gitea &#x2F;usr&#x2F;local&#x2F;bin&#x2F;gitea -c &#x2F;etc&#x2F;gitea&#x2F;app.ini web
&lt;&#x2F;span&gt;&lt;span&gt; 1 94 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 99 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 111 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 164 git {git} &#x2F;bin&#x2F;bash &#x2F;usr&#x2F;bin&#x2F;git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true init --bare
&lt;&#x2F;span&gt;&lt;span&gt; 164 165 sleep sleep infinity
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When the &lt;code&gt;git&lt;&#x2F;code&gt; process is killed by Gitea, the &lt;code&gt;sleep&lt;&#x2F;code&gt; child will be orphaned:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;$ docker exec gitea ps -o ppid,pid,comm,args
&lt;&#x2F;span&gt;&lt;span&gt;PPID PID COMMAND COMMAND
&lt;&#x2F;span&gt;&lt;span&gt; 0 1 gitea &#x2F;usr&#x2F;local&#x2F;bin&#x2F;gitea -c &#x2F;etc&#x2F;gitea&#x2F;app.ini web
&lt;&#x2F;span&gt;&lt;span&gt; 1 94 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 99 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 111 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 165 sleep sleep infinity
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Killing it will turn it into a zombie:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;$ docker exec gitea kill 165
&lt;&#x2F;span&gt;&lt;span&gt;$ docker exec gitea ps -o ppid,pid,comm,args
&lt;&#x2F;span&gt;&lt;span&gt;PPID PID COMMAND COMMAND
&lt;&#x2F;span&gt;&lt;span&gt; 0 1 gitea &#x2F;usr&#x2F;local&#x2F;bin&#x2F;gitea -c &#x2F;etc&#x2F;gitea&#x2F;app.ini web
&lt;&#x2F;span&gt;&lt;span&gt; 1 94 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 99 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 111 sleep [sleep]
&lt;&#x2F;span&gt;&lt;span&gt; 1 165 sleep [sleep]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;killing-a-child-process-and-all-its-children&quot;&gt;Killing a child process and all its children&lt;a class=&quot;zola-anchor&quot; href=&quot;#killing-a-child-process-and-all-its-children&quot; aria-label=&quot;Anchor link for: killing-a-child-process-and-all-its-children&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;There should be no need for an admin running Gitea to worry about those gory details, it should be taken care of regardless of the environment Gitea runs in. Fortunately there is a very simple way to avoid the creation of zombies by ensuring that all Gitea child process are &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Process_group&quot;&gt;process group leaders&lt;&#x2F;a&gt;. In a nutshell it means that when the child is killed all its children and grand children are also killed.&lt;&#x2F;p&gt;
</content>
</entry>
<entry xml:lang="en">
<title>[solved] Gitea 1.15 and up: path not found or permission denied</title>
<published>2022-05-28T00:00:00+00:00</published>
<updated>2022-05-28T00:00:00+00:00</updated>
<link href="https://gna.org/blog/path-not-found/" type="text/html"/>
<id>https://gna.org/blog/path-not-found/</id>
<content type="html">&lt;p&gt;In Gitea 1.15 the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;cfb4c23a5009b9c236d48ac0bc156577c7d70741&#x2F;custom&#x2F;conf&#x2F;app.example.ini&quot;&gt;app.example.ini&lt;&#x2F;a&gt; file was changed to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;commit&#x2F;4a84022d2559ccfc99960c7c654ee8b9b38664f7&quot;&gt;comment out most of the values&lt;&#x2F;a&gt;. The assumption was that all values exactly matched the defaults &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;main&#x2F;modules&#x2F;setting&#x2F;setting.go&quot;&gt;in the source code&lt;&#x2F;a&gt;. However, there are differences, for instance for &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;cfb4c23a5009b9c236d48ac0bc156577c7d70741&#x2F;modules&#x2F;setting&#x2F;setting.go#L771&quot;&gt;APP_DATA_PATH&lt;&#x2F;a&gt;. Before Gitea 1.15, &lt;code&gt;app.example.ini&lt;&#x2F;code&gt; contained:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;APP_DATA_PATH = data
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and the path was relative to the &lt;strong&gt;directory from which the Gitea server was running&lt;&#x2F;strong&gt;. In Gitea 1.15 up to 1.16, it was commented out:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;; APP_DATA_PATH = data
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and the path was relative to the &lt;strong&gt;work path directory&lt;&#x2F;strong&gt;, as provided either via the --work-path argument or the &lt;code&gt;GITEA_WORK_DIR&lt;&#x2F;code&gt; environment variable. &lt;&#x2F;p&gt;
&lt;p&gt;When a distribution such as voidlinux &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;void-linux&#x2F;void-packages&#x2F;blob&#x2F;master&#x2F;srcpkgs&#x2F;gitea&#x2F;patches&#x2F;config.patch&quot;&gt;uses app.example.ini&lt;&#x2F;a&gt; as a base for the Gitea package, this change indirectly creates a regression and an upgrade of Gitea &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;issues&#x2F;19367&quot;&gt;fails with errors&lt;&#x2F;a&gt; such as &lt;code&gt;unable to open level db at data&#x2F;data&#x2F;queues&#x2F;common: mkdir data: permission denied&lt;&#x2F;code&gt;. The regression did not show as soon as Gitea 1.15 became available in voidlinux because the package &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;void-linux&#x2F;void-packages&#x2F;blob&#x2F;7fc9190f0e0d557dd5031e68df4e183892d4315b&#x2F;srcpkgs&#x2F;gitea&#x2F;patches&#x2F;config.patch#L62&quot;&gt;explicitly set &lt;code&gt;APP_DATA_PATH&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. But this &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;void-linux&#x2F;void-packages&#x2F;commit&#x2F;19d986a2cae9ce73d32552ddb62443b5e7fa13e2&quot;&gt;changed when Gitea 1.15.6 was packaged&lt;&#x2F;a&gt; and once the value was commented out, upgrading triggered the problem. This was worked around six month later with the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;void-linux&#x2F;void-packages&#x2F;commit&#x2F;44b6c96fa12ce9d993c7a2ac9486d892735b7e3a&quot;&gt;Gitea 1.16.8&lt;&#x2F;a&gt; package.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;APP_DATA_PATH&lt;&#x2F;code&gt; directory is not the only one, the &lt;code&gt;[log] ROOT_PATH&lt;&#x2F;code&gt; is another example. There is an &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19815&quot;&gt;ongoing effort&lt;&#x2F;a&gt; to improve the situation in Gitea 1.17. With the downside of introducing breaking changes that will have an impact on all Gitea installations because the content of the &lt;code&gt;app.ini&lt;&#x2F;code&gt; file will be interpreted differently. In the case of &lt;code&gt;APP_DATA_PATH&lt;&#x2F;code&gt;, both:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;APP_DATA_PATH = data
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;; APP_DATA_PATH = data
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;will be interpreted to be relative to the &lt;strong&gt;work path directory&lt;&#x2F;strong&gt;, as provided either via the --work-path argument or the &lt;code&gt;GITEA_WORK_DIR&lt;&#x2F;code&gt; environment variable. Every Gitea installation using &lt;strong&gt;APP_DATA_PATH = data&lt;&#x2F;strong&gt; will need to update the value to be an absolute path such as &lt;strong&gt;&#x2F;var&#x2F;lib&#x2F;gitea&#x2F;data&lt;&#x2F;strong&gt; so that it keeps pointing to the expected directory.&lt;&#x2F;p&gt;
&lt;p&gt;In order to prepare for the change or ensure the consistency of all path, there fortunately is a very simple &lt;strong&gt;solution: always use absolute paths in the &lt;code&gt;app.ini&lt;&#x2F;code&gt; configuration file&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
</content>
</entry>
<entry xml:lang="en">
<title>[solved] Gitea 1.16.[678] error: fatal: unsafe repository is owned by someone else</title>
<published>2022-05-15T00:00:00+00:00</published>
<updated>2022-05-15T00:00:00+00:00</updated>
<link href="https://gna.org/blog/unsafe-repository-is-owned-by-someone-else/" type="text/html"/>
<id>https://gna.org/blog/unsafe-repository-is-owned-by-someone-else/</id>
<content type="html">&lt;p&gt;April 12, 2022 version &lt;a href=&quot;https:&#x2F;&#x2F;lore.kernel.org&#x2F;git&#x2F;xmqqv8veb5i6.fsf@gitster.g&#x2F;&quot;&gt;git v2.35.2&lt;&#x2F;a&gt; was released and addresses a security issue &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;git-for-windows&#x2F;git&#x2F;security&#x2F;advisories&#x2F;GHSA-vw2c-22j4-2fh2&quot;&gt;CVE-2022-24765&lt;&#x2F;a&gt;. It was backported to 2.30.3, v2.31.2, v2.32.1, v2.33.2, and v2.34.2 and published by distributions such as &lt;a href=&quot;https:&#x2F;&#x2F;security-tracker.debian.org&#x2F;tracker&#x2F;CVE-2022-24765&quot;&gt;Debian GNU&#x2F;Linux&lt;&#x2F;a&gt;, &lt;a href=&quot;https:&#x2F;&#x2F;www.alpinelinux.org&#x2F;releases&#x2F;&quot;&gt;Alpine&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;If Gitea runs as user &lt;code&gt;foo&lt;&#x2F;code&gt;, calls a patched Git version and a parent directory of the git repositories is owned by a user other than &lt;code&gt;foo&lt;&#x2F;code&gt;, it will fail&lt;&#x2F;strong&gt; with a message such as:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2b303b;color:#c0c5ce;&quot;&gt;&lt;code&gt;&lt;span&gt;Failed to open repository: Git&#x2F;Data Error: exit status 128 - fatal: unsafe repository (&amp;#39;&#x2F;data&#x2F;git&#x2F;repositories&#x2F;git&#x2F;data.git&amp;#39; is owned by someone else)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This started to show in the past few weeks to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;issues&#x2F;19455&quot;&gt;users running the Gitea binary on Windows&lt;&#x2F;a&gt; who also independently installed git v2.36. And then to people running &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;issues&#x2F;19455#issuecomment-1106331149&quot;&gt;Gitea from snap&lt;&#x2F;a&gt;, on &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;issues&#x2F;19455#issuecomment-1106312061&quot;&gt;a Synology NAS&lt;&#x2F;a&gt; and then people running from &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;main&#x2F;Dockerfile#L2&quot;&gt;Gitea docker images&lt;&#x2F;a&gt; which is based on &lt;a href=&quot;https:&#x2F;&#x2F;www.alpinelinux.org&#x2F;releases&#x2F;&quot;&gt;Alpine&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;workarounds&quot;&gt;Workarounds&lt;a class=&quot;zola-anchor&quot; href=&quot;#workarounds&quot; aria-label=&quot;Anchor link for: workarounds&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;If using &lt;a href=&quot;https:&#x2F;&#x2F;hub.docker.com&#x2F;r&#x2F;gitea&#x2F;gitea&quot;&gt;Gitea docker images&lt;&#x2F;a&gt;:
&lt;ul&gt;
&lt;li&gt;upgrade to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19876&quot;&gt;Gitea &amp;gt;=1.16.9&lt;&#x2F;a&gt; or 1.17, both have git &amp;gt;=2.36&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;git config --global --replace-all safe.directory &#x27;*&#x27;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;If the Gitea binary was installed independently of git, upgrade git to a version that is &lt;a href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-config#Documentation&#x2F;git-config.txt-safedirectory&quot;&gt;greater or equal to 2.36&lt;&#x2F;a&gt; and disable the security check entirely with:
&lt;ul&gt;
&lt;li&gt;impersonate the &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;install-from-binary&#x2F;#recommended-server-configuration&quot;&gt;user dedicated to Gitea&lt;&#x2F;a&gt; (usually git)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;git config --global --replace-all safe.directory &#x27;*&#x27;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;bug-fix&quot;&gt;Bug fix&lt;a class=&quot;zola-anchor&quot; href=&quot;#bug-fix&quot; aria-label=&quot;Anchor link for: bug-fix&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19870&quot;&gt;bug fix&lt;&#x2F;a&gt; is for Gitea to ensure &lt;code&gt;git config --global --replace-all safe.directory &#x27;*&#x27;&lt;&#x2F;code&gt; is set on its &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;install-from-binary&#x2F;#recommended-server-configuration&quot;&gt;dedicated user&lt;&#x2F;a&gt; when it initializes. It is effective on the condition that the git CLI version is &lt;a href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-config#Documentation&#x2F;git-config.txt-safedirectory&quot;&gt;greater or equal to 2.36&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;bug-fix-rationale&quot;&gt;Bug fix rationale&lt;a class=&quot;zola-anchor&quot; href=&quot;#bug-fix-rationale&quot; aria-label=&quot;Anchor link for: bug-fix-rationale&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;It is safe to &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;merge_requests&#x2F;50&#x2F;diffs&quot;&gt;disable the security check in Gitea&lt;&#x2F;a&gt;. It is not vulnerable to &lt;strong&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;git-for-windows&#x2F;git&#x2F;security&#x2F;advisories&#x2F;GHSA-vw2c-22j4-2fh2&quot;&gt;CVE-2022-24765&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt; because it calls the git CLI &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;main&#x2F;modules&#x2F;git&#x2F;command.go#L160&quot;&gt;after changing its working directory&lt;&#x2F;a&gt; to be the git repository targeted by the command (for instance &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;main&#x2F;modules&#x2F;git&#x2F;diff.go#L38-L45&quot;&gt;diff&lt;&#x2F;a&gt;) or a temporary directory. Therefore &lt;strong&gt;it will not explore the parent directories looking for a git configuration file&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The security check is triggered because the repository is owned by an unexpected user (root instead of git typically) and &lt;strong&gt;not because a parent directory is owned by an unexpected user&lt;&#x2F;strong&gt;. This, in itself, is a problem worth investigating but it is unrelated and was revealed by the newer security check of git even though it does not match the threat described in &lt;strong&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;git-for-windows&#x2F;git&#x2F;security&#x2F;advisories&#x2F;GHSA-vw2c-22j4-2fh2&quot;&gt;CVE-2022-24765&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;It appears non trivial to enforce a consistent ownership of files and directories, either within docker or outside docker when networked file systems are involved. The Gitea server was not troubled by this inconsistency so far because the permissions allow it to write and read where expected, regardless of the owner. It is not worth looking into but it is ancient and unrelated.&lt;&#x2F;p&gt;
&lt;p&gt;Gitea runs under a dedicated user, either when installed &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;install-from-binary&#x2F;#recommended-server-configuration&quot;&gt;from binary&lt;&#x2F;a&gt; or from &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;install-with-docker&#x2F;&quot;&gt;docker&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;blob&#x2F;main&#x2F;modules&#x2F;git&#x2F;git.go#L196-L207&quot;&gt;modifies the global git configuration&lt;&#x2F;a&gt; depending on the git version at initialization time. Fixing the problem can therefore be done by &lt;a href=&quot;https:&#x2F;&#x2F;lab.forgefriends.org&#x2F;forgefriends&#x2F;forgefriends&#x2F;-&#x2F;merge_requests&#x2F;50&#x2F;diffs#bcd72ff867cbd1ddd5b6518c3a05b5f1a6021286_209_209&quot;&gt;disabling the security check in the global git config file at initialization time&lt;&#x2F;a&gt;. It also requires a minimum version of git 2.36 to be installed, which is the case for Gitea docker images with &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19876&quot;&gt;versions &amp;gt;= 1.16.9&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
</entry>
<entry xml:lang="en">
<title>[solved] blank or error 500 page after login</title>
<published>2022-05-08T00:00:00+00:00</published>
<updated>2022-05-08T00:00:00+00:00</updated>
<link href="https://gna.org/blog/blank-or-error-500-page-after-login/" type="text/html"/>
<id>https://gna.org/blog/blank-or-error-500-page-after-login/</id>
<content type="html">&lt;p&gt;The &lt;a href=&quot;https:&#x2F;&#x2F;docs.gitea.io&#x2F;en-us&#x2F;upgrade-from-gitea&#x2F;#upgrade-from-binary&quot;&gt;instructions to upgrade a Gitea instance&lt;&#x2F;a&gt; only require three to four steps. They work fine most of the time but the documentation is lacking a &amp;quot;Troubleshooting&amp;quot; section to help out when something goes wrong. Maintaining instructions on how to diagnose and fix upgrade problems is an ambitious undertaking and requires updates every time a new case is discovered.&lt;&#x2F;p&gt;
&lt;p&gt;An &lt;a href=&quot;https:&#x2F;&#x2F;forum.gna.org&#x2F;t&#x2F;things-to-know-about-gitea-upgrades&#x2F;39&quot;&gt;inventory of the known upgrade issues&lt;&#x2F;a&gt; was started to figure out how to structure such a section in the documentation. The &lt;a href=&quot;https:&#x2F;&#x2F;blog.gitea.io&#x2F;&quot;&gt;release notes&lt;&#x2F;a&gt; were analyzed all the way back to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;releases&#x2F;tag&#x2F;v1.9.6&quot;&gt;Gitea 1.9.6&lt;&#x2F;a&gt; and the work is still in progress. Here is a sample of the tips that will be included:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Upgrade directly to the latest Gitea version, there is no need to upgrade to intermediate versions.&lt;&#x2F;li&gt;
&lt;li&gt;If the upgrade from version x.y to version x.y+2 fails and there is a need to narrow down the problem, try upgrading to the latest minor version of each major version and verify it works.&lt;&#x2F;li&gt;
&lt;li&gt;etc.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;However, even with the best documentation, someone will eventually &lt;strong&gt;run into an new problem&lt;&#x2F;strong&gt; and fixing it without compromising the integrity of the data will be challenging. This is best demonstrated by a real world example that was concluded a few days ago.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;getting-help-from-the-community&quot;&gt;Getting help from the community&lt;a class=&quot;zola-anchor&quot; href=&quot;#getting-help-from-the-community&quot; aria-label=&quot;Anchor link for: getting-help-from-the-community&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;After &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&quot;&gt;upgrading a Gitea intsance from 1.9.6 to 1.16.5&lt;&#x2F;a&gt; the tests conducted manually did not uncover any problem. However, after going to production, some users saw a blank page after login and had to manually type the URL of the project they wanted to see in the browser. The person in charge of the upgrade never had to diagnose Gitea problem and &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&quot;&gt;reached out in the Gitea forum&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip: explain the problem in a public forum as early as possible to get help from the community&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;In their post in the forum they explained how they attempted to diagnose the problem and how why they thought that only users created a few years ago were impacted. It was a detailed analysis that was concluded with a partial copy of the logs. It was unfortunately missing &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;12&quot;&gt;key information&lt;&#x2F;a&gt; that was provided only three days later. In the meantime, as they could not figure out the source of the problem, they were on the &lt;strong&gt;verge of &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;11&quot;&gt;accepting the loss of all the Gitea database&lt;&#x2F;a&gt; and start over from the repositories&lt;&#x2F;strong&gt;. However, once all the details were available, &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;13&quot;&gt;a workaround&lt;&#x2F;a&gt; was suggested in the forum.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip: focus more on providing detailed facts than exposing the attempted diagnostic&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;There was hope to fix Gitea and in the following days they applied the workaround. They also tried to improve it but without success and eventually accepted a &lt;strong&gt;partial data loss&lt;&#x2F;strong&gt; as inevitable and &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;14&quot;&gt;reported their success back to the forum&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip: when getting support from the community, providing feedback is the best token of appreciation&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h1 id=&quot;getting-professional-help&quot;&gt;Getting professional help&lt;a class=&quot;zola-anchor&quot; href=&quot;#getting-professional-help&quot; aria-label=&quot;Anchor link for: getting-professional-help&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;The &lt;a href=&quot;https:&#x2F;&#x2F;gna.org&#x2F;gitea-clinic&#x2F;&quot;&gt;Gna! Clinic&lt;&#x2F;a&gt; is a collective of individual and companies that provides professional services to Gitea admins. They are active members of the Gitea community who &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;u&#x2F;dachary&#x2F;activity&quot;&gt;help out&lt;&#x2F;a&gt; as volunteers. They can also be hired to resolve the more complicated cases.&lt;&#x2F;p&gt;
&lt;p&gt;The Gitea instance that was in trouble required more than a few minutes of work and access to the database content for a proper diagnostic. They &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;13&quot;&gt;proposed their assistance&lt;&#x2F;a&gt; but although &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;user-research-about-gitea-upgrade-experiences-call-for-volunteers&#x2F;5063&#x2F;2&quot;&gt;well received&lt;&#x2F;a&gt;, it was not accepted.&lt;&#x2F;p&gt;
&lt;p&gt;When the Gitea admin explained how they chose to resolve the problem &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;14&quot;&gt;on the forum&lt;&#x2F;a&gt;, it confirmed the workaround was viable and the root problem was identified. That was enough to figure out a fix for the underlying bug with &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;17&quot;&gt;a rather simple patch&lt;&#x2F;a&gt; that was merged &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19629&quot;&gt;and backported&lt;&#x2F;a&gt; in the following days. But it happened too late to avoid the data loss.&lt;&#x2F;p&gt;
&lt;p&gt;To summarize with a timeline, here is what happened:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;J+1: The &lt;strong&gt;problem is discovered&lt;&#x2F;strong&gt; by users who see a blank page after login and a the Gitea admin tries to diagnose the problem&lt;&#x2F;li&gt;
&lt;li&gt;J+2: A message is sent &lt;strong&gt;to ask for help in the community&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;li&gt;J+2 to J+6: Three people in the community suggest ideas but &lt;strong&gt;the Gitea admin cannot figure out the root cause and is on the verge of accepting the loss of all Gitea data&lt;&#x2F;strong&gt; and restart from the git repositories&lt;&#x2F;li&gt;
&lt;li&gt;J+6: A &lt;strong&gt;workaround is suggested by the community&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;li&gt;J+7 to J+17: The Gitea admin applies the &lt;strong&gt;workaround and only looses part of the Gitea data&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;And in retrospect, here is what could have happened instead:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;J+1: The &lt;strong&gt;problem is discovered&lt;&#x2F;strong&gt; by users who see a blank page after login&lt;&#x2F;li&gt;
&lt;li&gt;J+1: The Gitea admin &lt;strong&gt;&lt;a href=&quot;https:&#x2F;&#x2F;gna.org&#x2F;gitea-clinic&#x2F;&quot;&gt;reaches out to someone at the Gna! Clinic&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;li&gt;J+2: The &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;12&quot;&gt;logs of the Gitea instance&lt;&#x2F;a&gt; are analyzed, &lt;strong&gt;the root cause diagnosed&lt;&#x2F;strong&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;discourse.gitea.io&#x2F;t&#x2F;blank-page-after-login&#x2F;5051&#x2F;17&quot;&gt;a patch&lt;&#x2F;a&gt; is created to fix it.&lt;&#x2F;li&gt;
&lt;li&gt;J+3: If necessary a Gitea binary is created with the patch and used as a temporary replacement until the next point release is published with &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;go-gitea&#x2F;gitea&#x2F;pull&#x2F;19629&quot;&gt;the backport&lt;&#x2F;a&gt;. The Gitea admin runs the patched Gitea binary in the meantime. &lt;strong&gt;There is no data loss&lt;&#x2F;strong&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;It does not mean all upgrade problems can be resolved so easily. But it shows, with an example, that in some cases it makes sense to get professional help.&lt;&#x2F;p&gt;
</content>
</entry>
<entry xml:lang="en">
<title>Introducing Gna!</title>
<published>2022-04-22T00:00:00+00:00</published>
<updated>2022-04-22T00:00:00+00:00</updated>
<link href="https://gna.org/blog/22-04-2022-hostea-introducing-hostea-forgefriends-monthly-meet/" type="text/html"/>
<id>https://gna.org/blog/22-04-2022-hostea-introducing-hostea-forgefriends-monthly-meet/</id>
<content type="html">&lt;p&gt;Introducing &lt;a href=&quot;https:&#x2F;&#x2F;gna.org&quot;&gt;Hostea&lt;&#x2F;a&gt;, a project &lt;a href=&quot;https:&#x2F;&#x2F;dachary.org&quot;&gt;Loïc
Dachary&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;batsense.net&quot;&gt;Aravinth
Manivannan&lt;&#x2F;a&gt; are working on to create a full Free
software development suite based on
&lt;a href=&quot;https:&#x2F;&#x2F;gitea.io&quot;&gt;Gitea&lt;&#x2F;a&gt; for the forge, &lt;a href=&quot;https:&#x2F;&#x2F;woodpecker-ci.org&quot;&gt;Woodpecker
CI&lt;&#x2F;a&gt; for CI&#x2F;CD,
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;realaravinth&#x2F;pages&quot;&gt;Pages&lt;&#x2F;a&gt; for static sites and
&lt;a href=&quot;https:&#x2F;&#x2F;gitpad.org&quot;&gt;GitPad&lt;&#x2F;a&gt; for gists.&lt;&#x2F;p&gt;
&lt;p&gt;This talk introduces the projects goals and philosophy behind the
project.&lt;&#x2F;p&gt;
&lt;p&gt;Please see
&lt;a href=&quot;https:&#x2F;&#x2F;forum.forgefriends.org&#x2F;t&#x2F;forgefriends-monthly-update-april-22st-2022-5pm-6pm-utc-2&#x2F;673&quot;&gt;here&lt;&#x2F;a&gt;
to learn more about the event.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;details&quot;&gt;Details&lt;a class=&quot;zola-anchor&quot; href=&quot;#details&quot; aria-label=&quot;Anchor link for: details&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;organised by:&lt;&#x2F;strong&gt; &lt;a href=&quot;https:&#x2F;&#x2F;forgefriends.org&quot;&gt;forgefriends.org&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;date:&lt;&#x2F;strong&gt; 2022&lt;sup&gt;th&lt;&#x2F;sup&gt; April, 2022&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;venue:&lt;&#x2F;strong&gt; Online&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;a class=&quot;zola-anchor&quot; href=&quot;#resources&quot; aria-label=&quot;Anchor link for: resources&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;.&#x2F;slides&#x2F;2022-04-22-forgefriends-introducing-hostea.odp&quot;&gt;slides(ODP)&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;.&#x2F;slides&#x2F;2022-04-22-forgefriends-introducing-hostea.pdf&quot;&gt;slides(PDF)&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
</entry>
<entry xml:lang="en">
<title>Project plans for a hosted Gitea online service</title>
<published>2022-04-18T00:00:00+00:00</published>
<updated>2022-04-18T00:00:00+00:00</updated>
<link href="https://gna.org/blog/project-plans-for-hosted-gitea-online-service/" type="text/html"/>
<id>https://gna.org/blog/project-plans-for-hosted-gitea-online-service/</id>
<content type="html">&lt;p&gt;&lt;em&gt;This post was originally published on &lt;a href=&quot;https:&#x2F;&#x2F;blog.dachary.org&#x2F;2022&#x2F;02&#x2F;16&#x2F;project-plans-for-a-hosted-gitea-online-service&#x2F;&quot;&gt;Loïc Dachary&#x27;s
blog&lt;&#x2F;a&gt;.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;When an organization asks me about Gitea, I would like to direct them to
a provider where they can rent an instance and just use it, in the same
way they can go to https:&#x2F;&#x2F;discourse.org for a forum, or
https:&#x2F;&#x2F;nextcloud.com for storage. Instead of waiting for that to
happen, &lt;a href=&quot;https:&#x2F;&#x2F;batsense.net&#x2F;about&#x2F;&quot;&gt;Aravinth&lt;&#x2F;a&gt; and
&lt;a href=&quot;https:&#x2F;&#x2F;dachary.org&#x2F;&quot;&gt;myself&lt;&#x2F;a&gt; decided to do something about it, in a
way that is in line with our shared values: transparency and Free
Software.&lt;&#x2F;p&gt;
&lt;p&gt;After doing some research we found counter examples that showed the
pitfalls to avoid. GitLab because its business model heavily relies on
selling proprietary licenses. CiviCRM because setting it up is complex
and requires training: users can&#x27;t figure it out on their own. Gitea
images provided by Digital Ocean because they do not include security
upgrades. MySQL configured and run by AWS because of the vendor lock-in
that makes it impossible to self-host.&lt;&#x2F;p&gt;
&lt;p&gt;We concluded that an online service such as Gitea can be hosted in a
sustainable way as long as:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;It is well maintained and upgrades itself&lt;&#x2F;li&gt;
&lt;li&gt;It can be self-hosted&lt;&#x2F;li&gt;
&lt;li&gt;The service can automatically be restored from backups when the
underlying resources fail&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;GitHub and GitLab make it look like there is a market around software
forges. It is however impossible to figure out if this market exists
only because it is based on proprietary software. How many of these
customers would pay for a Free Software hosted Gitea instance?&lt;&#x2F;p&gt;
&lt;p&gt;Even if these customers do exist, a new service provider would have to
figure out how to convince them to subscribe. The technical development
of the service can be done within weeks but building a sustainable
business takes much longer. Again, there were examples of what can go
wrong, for instance ElasticSearch. After years of work developing a
successful online service and a customer base, AWS entered the
competition and started to take it away from them.&lt;&#x2F;p&gt;
&lt;p&gt;The sustainability of the Free Software ecosystem is a new and very
difficult problem to solve. It is discussed more than it ever was in the
wake of security breaches originating from widely used and yet abandoned
library or disillusioned Free Software authors self-sabotaging their
next release, and everyone has diverging opinions. It falls on each Free
Software author to spend time to think about their own projects because
there are no handbook or good examples to follow. That is what Aravinth
and myself did to find a semblance of clarity and decide how to go about
this hosted Gitea service idea.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;sustaining-free-software-online-services&quot;&gt;Sustaining Free Software online services&lt;a class=&quot;zola-anchor&quot; href=&quot;#sustaining-free-software-online-services&quot; aria-label=&quot;Anchor link for: sustaining-free-software-online-services&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;more-mature-online-services-mean-less-opportunities-to-sell-services&quot;&gt;More mature online services mean less opportunities to sell services&lt;a class=&quot;zola-anchor&quot; href=&quot;#more-mature-online-services-mean-less-opportunities-to-sell-services&quot; aria-label=&quot;Anchor link for: more-mature-online-services-mean-less-opportunities-to-sell-services&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Ideally the software running an online service is rock solid and bugs
are so rare that it can run unattended. This is true of
https:&#x2F;&#x2F;wordpress.org and it is not uncommon for an instance to run for
years while upgrading themselves to get security patches. The cost of
maintaining such a service is negligible and hosting companies can offer
it for free to their customers. They make their profit by renting the
machines on which the service runs.&lt;&#x2F;p&gt;
&lt;p&gt;When the software is not as mature, it is more expensive to run. Bugs
need fixing, upgrades require manual intervention, users must be trained
to overcome the complexity of the user experience, etc. Well known
examples are Discourse or CiviCRM for which companies sell services to
overcome these issues.&lt;&#x2F;p&gt;
&lt;p&gt;But when an organization is both the author of the software and the
provider of paid services to compensate for its lack of maturity, it
creates a conflict of interest. Should they focus their effort on making
the software more mature, they would harm a business model that is based
on this very lack of maturity. For instance, if the author of a software
also sells training courses, they are not motivated to solve user
experience issues. If they did, it would lower the need for training
courses and reduce their income.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;free-software-online-services-in-the-wake-of-the-sustainability&quot;&gt;Free Software online services in the wake of the sustainability&lt;a class=&quot;zola-anchor&quot; href=&quot;#free-software-online-services-in-the-wake-of-the-sustainability&quot; aria-label=&quot;Anchor link for: free-software-online-services-in-the-wake-of-the-sustainability&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;crisis&lt;&#x2F;p&gt;
&lt;p&gt;Nowadays all Free Software authors struggle to get enough resources to
produce a steady stream of releases, even when the project is very
popular. This sustainability problem is getting more and more attention
as the number of Free Software projects in use world wide keeps growing.
Even the simplest online service relies on thousands of Free Software
projects, each of which needs work to keep going. Accidents caused by
poorly maintained Free Software projects become more frequent.&lt;&#x2F;p&gt;
&lt;p&gt;This Free Software sustainability crisis is barely emerging and very
much resembles ecological problems such as climate change. In both cases
it is very difficult to figure out how to properly care for the
resources that are consumed. After decades of advocacy, it is generally
accepted that fossil energy won&#x27;t last forever but there still is a long
way to go. It will also take a long time for the Free Software community
to answer this simple question: how to sustain an ever growing library
of Free Software?&lt;&#x2F;p&gt;
&lt;p&gt;Luckily, it is relatively simpler to solve that problem for an online
service because it has users. They can be reminded that their assistance
is needed to keep the project afloat, for instance by a donation. A
proposition that would be much more difficult to make for the author of
a cryptographic library. Convincing users to pay for an online service
has the best chance of success when the author of the software is also
the service provider. This is the business model of Discourse and
Weblate, but it is relatively fragile because nothing stands in the way
of the competition.&lt;&#x2F;p&gt;
&lt;p&gt;A few years ago ElasticSearch successfully developed an online service
offering. But when AWS entered the competition and was better at
marketing it, ElasticSearch quickly realized they would likely go out of
business. They tried to fight back by &lt;a href=&quot;https:&#x2F;&#x2F;www.elastic.co&#x2F;blog&#x2F;licensing-change&quot;&gt;changing their
license&lt;&#x2F;a&gt;, which was the
wrong answer to a real problem. Discourse or Weblate are also likely to
face competition from hosting companies in the future and they may not
survive it.&lt;&#x2F;p&gt;
&lt;p&gt;In the end, the durable source of income for a Free Software online
service is to rent the resources (CPU&#x2F;RAM&#x2F;network&#x2F;disk) it needs to run.
In other words only hosting companies can make a profit when running
such an online service. And for that reason they also need to share part
of the profits to ensure the sustainability of the Free Software service
their customers need.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;online-services-vendor-lock-in-is-cured-by-free-software&quot;&gt;Online services vendor lock-in is cured by Free Software&lt;a class=&quot;zola-anchor&quot; href=&quot;#online-services-vendor-lock-in-is-cured-by-free-software&quot; aria-label=&quot;Anchor link for: online-services-vendor-lock-in-is-cured-by-free-software&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;When hosting companies offer online services they also provide upgrades
and transparent recovery when the hardware fails. But none of them allow
the service to be self-hosted. When their price policy change, or when
the term of services ban users from a given country, migrating the
service elsewhere it costly and difficult. For instance when AWS runs
MySQL for their customers, they allow to download the data but not the
software that runs the proprietary AWS interface used to configure and
control the server. Another example is GitHub where the content of the
git repository can be downloaded but the code that runs GitHub itself is
not Free Software.&lt;&#x2F;p&gt;
&lt;p&gt;If a customer cannot run the same software as their service provider,
they are locked-in, even if they can download their data. It is a common
misconception to think that there is no vendor lock-in as long as it is
possible to download the data in an standard format. Migrating the data
from one software to another is, more often than not, time consuming and
costly to a point that it is effectively a blocker. A GitHub salesperson
would argue that it is possible for people to run GitHub Enterprise on
their own hardware. But the vendor lock-in is still present via the
proprietary license contract. The user experience, maintenance and
upgrades are still exclusively controlled by GitHub.&lt;&#x2F;p&gt;
&lt;p&gt;To guarantee their independence, the customers of an online service need
to be able to:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Download their data&lt;&#x2F;li&gt;
&lt;li&gt;Run the exact same Free Software as their service provider&lt;&#x2F;li&gt;
&lt;li&gt;Run the exact same Free Software infrastructure as code as their
service provider&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The requirement regarding Free Software infrastructure as code refers
to, for instance, the AWS control panel and all that is behind it when
creating a new MySQL service. It includes whatever a competitor would
need to run the same online service. An example would be
https:&#x2F;&#x2F;enough.community, an infrastructure as code dedicated to
creating the services needed by whistleblowers and human rights
defenders. It consumes resources rented by hosting providers, assembles
disks and machines, setup monitoring and intrusion detection, installs
various online services and upgrades them.&lt;&#x2F;p&gt;
&lt;p&gt;The availability of the software that creates the infrastructure is not
only useful to the competitors of a service provider. It also benefits a
non-profit that wants to provide (for instance) Wordpress instances to
its members. Without it they would need to create something from scratch
using building blocks such as CiviCRM. Even though such building blocks
exist, this is a significant undertaking and effectively a blocker.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;federated-online-services-and-durability&quot;&gt;Federated online services and durability&lt;a class=&quot;zola-anchor&quot; href=&quot;#federated-online-services-and-durability&quot; aria-label=&quot;Anchor link for: federated-online-services-and-durability&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;All self-hosted services are in danger of losing the data they contain.
When a Wordpress service is hosted in a home and the machine dies, it
must be restored from backups... when there are backups. Hosting
companies ensure the durability of the data with their own backup
system. It creates a dilemma for people who are looking into self
hosting: independence is desirable, but is it worth taking the risk of
data loss?&lt;&#x2F;p&gt;
&lt;p&gt;Federated online services do not suffer from this problem, because they
can mirror each other. A Gitea instance that is federated with another
will mirror copies of software projects found on its peers. Should one
instance be destroyed, mirrored projects can be resurrected from the
federated instance. Not only is it a practical way to ensure the (rare)
failure of an entire datacenter, it also helps with the (more frequent)
destruction of self-hosted machines. Contrary to backups that require
special attention, the replication involved in federated online service
is built in and works continuously. There is no need for an extra backup
service that is very rarely used and therefore likely to fail when
needed.&lt;&#x2F;p&gt;
&lt;p&gt;Federated services are not yet mainstream and Gitea is one of the rare
services that started to implement the concept. In the interim,
customers of an online hosting service will need to worry about backups
to ensure the durability of their data. But the ultimate solution for
them won&#x27;t be the emergence of an ideal backup infrastructure, it will
be replication (via federated services) that will continuously ensure
the durability of their data.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;paths-forward&quot;&gt;Paths forward&lt;a class=&quot;zola-anchor&quot; href=&quot;#paths-forward&quot; aria-label=&quot;Anchor link for: paths-forward&quot;
&gt;&lt;span class=&quot;anchor-icon&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a
&gt;
&lt;&#x2F;h1&gt;
&lt;p&gt;The Gitea project itself, following the footsteps of Discourse or
Weblate, could provide a hosting service. Part of its current user base
may become customers and there does not seem to be any blocker to make
that happen. As with most successful Free Software project, people
working on Gitea daily are already very busy and cannot engage in such a
long term project. But Aravinth and myself can, if they will have us.&lt;&#x2F;p&gt;
&lt;p&gt;Another path forward would be to wrap Gitea into a bundle that existing
hosting companies could easily use to provide such a service to their
customers. The biggest hosting companies are unlikely to be interested:
if Digital Ocean was to provide upgrades on top of their existing Gitea
image, they are more likely to rely on their internal staff to implement
that from scratch, as proprietary software integrated into their
existing infrastructure. But smaller hosting companies such as
https:&#x2F;&#x2F;Octopuce.fr or https:&#x2F;&#x2F;Easter-Eggs.com, who already deploy Gitea
instances for their customers, would use it if, for instance, it helped
with the upgrades. They would then kindly be reminded to give back a
share of their profits in order to sustain the development of the
service they deploy.&lt;&#x2F;p&gt;
&lt;p&gt;Finally it would also be possible to follow the example of GitLab in the
early days (before it turned to proprietary software) or Codeberg and
offer a free shared forge hosting service to build a user base. After a
few years, a percentage of the user base would convert to being paid
customers or donors to sustain the activity and part of the income would
be used to sustain the development of the service.&lt;&#x2F;p&gt;
</content>
</entry>
</feed>

View File

@ -0,0 +1,357 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>[solved] blank or error 500 page after login | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="After going to production, some Gitea users saw a blank page after login and had to manually type the URL of the project they wanted to see in the browser." />
<meta property="og:title" content="[solved] blank or error 500 page after login | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="After going to production, some Gitea users saw a blank page after login and had to manually type the URL of the project they wanted to see in the browser." />
<meta
property="og:site_name"
content="[solved] blank or error 500 page after login | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">[solved] blank or error 500 page after login</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 8
May
,
2022 &middot; <b>6 min read</b>
</p>
<div class="blog__content">
<p>The <a href="https://docs.gitea.io/en-us/upgrade-from-gitea/#upgrade-from-binary">instructions to upgrade a Gitea instance</a> only require three to four steps. They work fine most of the time but the documentation is lacking a &quot;Troubleshooting&quot; section to help out when something goes wrong. Maintaining instructions on how to diagnose and fix upgrade problems is an ambitious undertaking and requires updates every time a new case is discovered.</p>
<p>An <a href="https://forum.gna.org/t/things-to-know-about-gitea-upgrades/39">inventory of the known upgrade issues</a> was started to figure out how to structure such a section in the documentation. The <a href="https://blog.gitea.io/">release notes</a> were analyzed all the way back to <a href="https://github.com/go-gitea/gitea/releases/tag/v1.9.6">Gitea 1.9.6</a> and the work is still in progress. Here is a sample of the tips that will be included:</p>
<ul>
<li>Upgrade directly to the latest Gitea version, there is no need to upgrade to intermediate versions.</li>
<li>If the upgrade from version x.y to version x.y+2 fails and there is a need to narrow down the problem, try upgrading to the latest minor version of each major version and verify it works.</li>
<li>etc.</li>
</ul>
<p>However, even with the best documentation, someone will eventually <strong>run into an new problem</strong> and fixing it without compromising the integrity of the data will be challenging. This is best demonstrated by a real world example that was concluded a few days ago.</p>
<h1 id="getting-help-from-the-community">Getting help from the community<a class="zola-anchor" href="#getting-help-from-the-community" aria-label="Anchor link for: getting-help-from-the-community"
><span class="anchor-icon">#</span></a
>
</h1>
<p>After <a href="https://discourse.gitea.io/t/blank-page-after-login/5051">upgrading a Gitea intsance from 1.9.6 to 1.16.5</a> the tests conducted manually did not uncover any problem. However, after going to production, some users saw a blank page after login and had to manually type the URL of the project they wanted to see in the browser. The person in charge of the upgrade never had to diagnose Gitea problem and <a href="https://discourse.gitea.io/t/blank-page-after-login/5051">reached out in the Gitea forum</a>.</p>
<blockquote>
<p><strong>Tip: explain the problem in a public forum as early as possible to get help from the community</strong></p>
</blockquote>
<p>In their post in the forum they explained how they attempted to diagnose the problem and how why they thought that only users created a few years ago were impacted. It was a detailed analysis that was concluded with a partial copy of the logs. It was unfortunately missing <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/12">key information</a> that was provided only three days later. In the meantime, as they could not figure out the source of the problem, they were on the <strong>verge of <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/11">accepting the loss of all the Gitea database</a> and start over from the repositories</strong>. However, once all the details were available, <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/13">a workaround</a> was suggested in the forum.</p>
<blockquote>
<p><strong>Tip: focus more on providing detailed facts than exposing the attempted diagnostic</strong></p>
</blockquote>
<p>There was hope to fix Gitea and in the following days they applied the workaround. They also tried to improve it but without success and eventually accepted a <strong>partial data loss</strong> as inevitable and <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/14">reported their success back to the forum</a>.</p>
<blockquote>
<p><strong>Tip: when getting support from the community, providing feedback is the best token of appreciation</strong></p>
</blockquote>
<h1 id="getting-professional-help">Getting professional help<a class="zola-anchor" href="#getting-professional-help" aria-label="Anchor link for: getting-professional-help"
><span class="anchor-icon">#</span></a
>
</h1>
<p>The <a href="https://gna.org/gitea-clinic/">Gna! Clinic</a> is a collective of individual and companies that provides professional services to Gitea admins. They are active members of the Gitea community who <a href="https://discourse.gitea.io/u/dachary/activity">help out</a> as volunteers. They can also be hired to resolve the more complicated cases.</p>
<p>The Gitea instance that was in trouble required more than a few minutes of work and access to the database content for a proper diagnostic. They <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/13">proposed their assistance</a> but although <a href="https://discourse.gitea.io/t/user-research-about-gitea-upgrade-experiences-call-for-volunteers/5063/2">well received</a>, it was not accepted.</p>
<p>When the Gitea admin explained how they chose to resolve the problem <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/14">on the forum</a>, it confirmed the workaround was viable and the root problem was identified. That was enough to figure out a fix for the underlying bug with <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/17">a rather simple patch</a> that was merged <a href="https://github.com/go-gitea/gitea/pull/19629">and backported</a> in the following days. But it happened too late to avoid the data loss.</p>
<p>To summarize with a timeline, here is what happened:</p>
<ul>
<li>J+1: The <strong>problem is discovered</strong> by users who see a blank page after login and a the Gitea admin tries to diagnose the problem</li>
<li>J+2: A message is sent <strong>to ask for help in the community</strong></li>
<li>J+2 to J+6: Three people in the community suggest ideas but <strong>the Gitea admin cannot figure out the root cause and is on the verge of accepting the loss of all Gitea data</strong> and restart from the git repositories</li>
<li>J+6: A <strong>workaround is suggested by the community</strong></li>
<li>J+7 to J+17: The Gitea admin applies the <strong>workaround and only looses part of the Gitea data</strong></li>
</ul>
<p>And in retrospect, here is what could have happened instead:</p>
<ul>
<li>J+1: The <strong>problem is discovered</strong> by users who see a blank page after login</li>
<li>J+1: The Gitea admin <strong><a href="https://gna.org/gitea-clinic/">reaches out to someone at the Gna! Clinic</a></strong></li>
<li>J+2: The <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/12">logs of the Gitea instance</a> are analyzed, <strong>the root cause diagnosed</strong> and <a href="https://discourse.gitea.io/t/blank-page-after-login/5051/17">a patch</a> is created to fix it.</li>
<li>J+3: If necessary a Gitea binary is created with the patch and used as a temporary replacement until the next point release is published with <a href="https://github.com/go-gitea/gitea/pull/19629">the backport</a>. The Gitea admin runs the patched Gitea binary in the meantime. <strong>There is no data loss</strong>.</li>
</ul>
<p>It does not mean all upgrade problems can be resolved so easily. But it shows, with an example, that in some cases it makes sense to get professional help.</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,339 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Get a Gitea instance with CI at Gna! | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="It is now possible to rent a Gitea instance by the month, with Woodpecker CI. A self-hostable hosting solution supported by a horizontal collective of individuals and organizations. 25% of the income is dedicated to help the Free Software projects it depends on such as Gitea, Enough, Django, etc." />
<meta property="og:title" content="Get a Gitea instance with CI at Gna! | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="It is now possible to rent a Gitea instance by the month, with Woodpecker CI. A self-hostable hosting solution supported by a horizontal collective of individuals and organizations. 25% of the income is dedicated to help the Free Software projects it depends on such as Gitea, Enough, Django, etc." />
<meta
property="og:site_name"
content="Get a Gitea instance with CI at Gna! | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">Get a Gitea instance with CI at Gna!</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 10
July
,
2022 &middot; <b>5 min read</b>
</p>
<div class="blog__content">
<p>Hosting a Gitea instance on Gna! is now possible (but still experimental). It is meant to be a minimum viable product: anyone can <a href="https://hosteadashboard.gna.org">create a new dedicated Gitea instance</a> within minutes and pay for it on a monthly basis with a credit card. It includes a dedicated CI based on <a href="https://woodpecker-ci.org/">Woodpecker</a>. The smallest instance costs 10€ per month (2GB RAM, 10GB disk, 1CPU) and will be a good fit for a freelance up to a team of five people but bigger instances are also available if more RAM, CPU or disk is required.</p>
<video width="600" controls>
<source src="https://cloud.forgefriends.org/s/xXLcYpsE469tJEj/download?path=&files=hostea-screencast-vm-create.mp4" type="video/mp4" />
</video>
<p>The service is 100% infrastructure as code, published as <a href="https://lab.enough.community/main/infrastructure/-/tree/9e18ebbf675c8a65d1585d20b4cf6295af6e52ed/playbooks/hosteadashboard">Ansible playbooks within Enough</a>. It can be self-hosted on bare metal (with <a href="https://libvirt.org/">libvirt</a>) or in the cloud (with <a href="https://www.openstack.org/">OpenStack</a>): follow the <a href="https://enough-community.readthedocs.io/en/latest/introduction.html#quick-start">quick start</a>, configure playbooks for <a href="https://enough-community.readthedocs.io/en/latest/services/hostea.html">hostea</a> and <a href="https://enough-community.readthedocs.io/en/latest/services/hosteadashboard.html">the dashboard</a>.</p>
<p>The organization supporting Gna! is a <a href="https://forum.gna.org/c/governance-and-decisions/7">horizontal collective</a> of individuals and organizations. The <a href="https://forum.gna.org/t/decision-revenue-sharing-model/92">revenue sharing model</a> is set to dedicate 25% of the income (more than the profits) to help the Free Software projects Hostea depends on such as Gitea, Enough, Django etc.</p>
<h3 id="the-origin">The origin<a class="zola-anchor" href="#the-origin" aria-label="Anchor link for: the-origin"
><span class="anchor-icon">#</span></a
>
</h3>
<p>In February 2022 the project of running a dedicated Gitea hosting service was <a href="https://discourse.gitea.io/t/a-gitea-hosting-service-under-the-umbrella-of-the-gitea-project/4692">proposed to the Gitea project</a> and other organizations and <a href="https://blog.dachary.org/2022/02/16/project-plans-for-a-hosted-gitea-online-service/">plans were drafted</a>. After a month of discussions it turned out to not be a <a href="https://blog.dachary.org/2022/03/11/the-inconclusive-story-of-four-failed-project-offers/">good match for any of them</a>.</p>
<p>It was suggested to create a new project from scratch instead of joining an existing organization. However, in order to be sustainable, a hosting service needs customers willing to pay for the service. And nobody had that kind of skill. It was therefore decided that to terminate the project: there is no point is creating a technical stack that's not going to be used by anyone.</p>
<h3 id="a-technical-stack-with-no-users">A technical stack with no users<a class="zola-anchor" href="#a-technical-stack-with-no-users" aria-label="Anchor link for: a-technical-stack-with-no-users"
><span class="anchor-icon">#</span></a
>
</h3>
<p>The most common mistake technical people do when creating a new piece of software is to overlook the fact that they have absolutely no idea how to let their intended user base know about it. Maybe the reason it happens so often is because it is very difficult to resist the urge of creating something. Because that's what technical people love to do: create things, even when they have no clue if it can be used.</p>
<p>It took no longer than two weeks for the people involved in Gna! to decide to build the technical stack to run hostea instead of being reasonable and give up. It was just too tempting.</p>
<p>To keep the madness contained and enjoyable, it was decided to set a deadline to July 1st and to <a href="https://gitea.gna.org/Hostea/july-mvp/issues">define precise and realistic technical goals</a>. It turned out to be an enjoyable experience: everyone learned a lot in the process and the outcome is something that can be reproduced. Most MVPs are a brittle pile of hacks designed to last a few weeks and be thrown away. But since a primary goal of the project was to create something self-hostable, it had to implement that feature and therefore be reproducible.</p>
<h3 id="a-horizontal-collective-with-a-revenue-sharing-model">A horizontal collective with a revenue sharing model<a class="zola-anchor" href="#a-horizontal-collective-with-a-revenue-sharing-model" aria-label="Anchor link for: a-horizontal-collective-with-a-revenue-sharing-model"
><span class="anchor-icon">#</span></a
>
</h3>
<p>Another goal of Gna! is to deploy federated forges, even at an experimental stage. Instead of creating a centralized organization to support Gna!, it was decided to create <a href="https://forum.gna.org/c/governance-and-decisions/7">horizontal collective</a>. It feels like a contradiction for a project committed to decentralization to be governed by a centralized organization.</p>
<p>The collective is composed of individuals and organizations but, unlike exclusively volunteer based Free Software projects, it is for profit. Customers rent Gitea instances by the month and the income is used to pay for expenses. There is however a difficulty: by nature a horizontal collective cannot be incorporated as it would create a level of hierarchy. The <a href="https://forum.gna.org/t/decision-revenue-sharing-model/92">revenue sharing model</a> had to be set as an informal agreement between members where one of them receives the income and distributes it to the others, depending on their Gna! related expenses.</p>
<p>It also requires that 25% of the income (not the profits) is dedicated to help the Free Software projects that Gna! depends on such as Gitea, Enough, Django etc. It can be via a donation, by upstreaming a bug fix or any kind of work that is beneficial to the dependency.</p>
<h3 id="dedicated-to-forge-federation">Dedicated to forge federation<a class="zola-anchor" href="#dedicated-to-forge-federation" aria-label="Anchor link for: dedicated-to-forge-federation"
><span class="anchor-icon">#</span></a
>
</h3>
<p>In the spirit of dogfooding, the people who created the technical stack of Gna! will use it for themselves on a daily basis. Since the focus of the authors is on <a href="https://forgefriends.org/blog/2022/06/30/2022-06-state-forge-federation/">forge federation</a>, they will add federation support in Hostea. This will be their primary motivation to improve and maintain Hostea: it is the only hosting platform where this can happen.</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/federation">#federation</a>
<a class="blog__post-tag" href="/tags/forgefriends">#forgefriends</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,428 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>[tutorial] A gentle introduction to the gitea doctor | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="The doctor command is useful to check the health of a running Gitea instance. Specially after performing an upgrade." />
<meta property="og:title" content="[tutorial] A gentle introduction to the gitea doctor | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="The doctor command is useful to check the health of a running Gitea instance. Specially after performing an upgrade." />
<meta
property="og:site_name"
content="[tutorial] A gentle introduction to the gitea doctor | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">[tutorial] A gentle introduction to the gitea doctor</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 14
June
,
2022 &middot; <b>7 min read</b>
</p>
<div class="blog__content">
<p>While helping people with their upgrades <a href="https://discourse.gitea.io/t/migration-from-1-2-to-1-16-8/5309">in the Gitea forum</a> or <a href="https://forum.gna.org/t/gitea-upgrade-from-1-14-1-to-1-16-8/90">at the Gna! clinic</a>, I realized that few Gitea admins know about the <a href="https://docs.gitea.io/en-us/command-line/#doctor"><code>gitea doctor</code></a> command and decided to write this blog post as a gentle introduction.</p>
<h3 id="an-apple-a-day-keeps-the-doctor-away">An apple a day keeps the doctor away<a class="zola-anchor" href="#an-apple-a-day-keeps-the-doctor-away" aria-label="Anchor link for: an-apple-a-day-keeps-the-doctor-away"
><span class="anchor-icon">#</span></a
>
</h3>
<p>Or in our case, Gitea versions <a href="https://github.com/go-gitea/gitea/blob/v1.11.5/cmd/doctor.go">below 1.11.5</a>. Since then, the <code>gitea doctor</code> is available and is designed to run against a specific Gitea version. It would not be a good idea to try to run the doctor from Gitea 1.16 to verify the sanity of a Gitea 1.2 instance: it will be confused by how the database is organized and a number of other details. Historical fun fact: the <code>gitea doctor</code> was backported to <a href="https://github.com/go-gitea/gitea/blob/v1.10.5/cmd/doctor.go">Gitea 1.10.5</a> and <a href="https://github.com/go-gitea/gitea/blob/v1.10.6/cmd/doctor.go">Gitea 1.10.6</a> and may be of help if you run this particular version and are facing the problem that motivated the backport.</p>
<p>With each version <code>gitea doctor</code> improves and gains new capabilities. For instance, in Gitea 1.17 it becomes aware of <a href="https://github.com/go-gitea/gitea/pull/19731">orphaned pull requests</a> and is able to fix them. If such a problem exists in Gitea 1.16, it does not know about it.</p>
<h3 id="calling-the-doctor">Calling the doctor<a class="zola-anchor" href="#calling-the-doctor" aria-label="Anchor link for: calling-the-doctor"
><span class="anchor-icon">#</span></a
>
</h3>
<p>In the following, examples are based on a Gitea 1.16.8 instance you can run as follows:</p>
<pre data-lang="bash" style="background-color:#2b303b;color:#c0c5ce;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">$</span><span> docker run</span><span style="color:#bf616a;"> --name</span><span> gitea</span><span style="color:#bf616a;"> -p</span><span> 3000:3000</span><span style="color:#bf616a;"> -e</span><span> GITEA__security__INSTALL_LOCK=true</span><span style="color:#bf616a;"> -d</span><span> gitea/gitea:1.16.8-rootless
</span><span style="color:#bf616a;">$</span><span> docker exec gitea gitea admin user create</span><span style="color:#bf616a;"> --admin --username</span><span> root</span><span style="color:#bf616a;"> --password</span><span> admin1234</span><span style="color:#bf616a;"> --email</span><span> root@example.com
</span><span style="color:#bf616a;">$</span><span> docker exec gitea mkdir /var/lib/gitea/data/log
</span></code></pre>
<p>And then you can go to the <a href="https://127.0.0.1:3000/">web interface</a> to create a <code>test</code> repository, with an initial <code>README.md</code> file. When this is done the doctor can be called as follows:</p>
<pre data-lang="bash" style="background-color:#2b303b;color:#c0c5ce;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">$</span><span> docker exec gitea gitea doctor</span><span style="color:#bf616a;"> --all
</span><span style="color:#bf616a;">[1]</span><span> Check paths and basic configuration
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> Configuration File Path: &quot;</span><span style="color:#a3be8c;">/etc/gitea/app.ini</span><span>&quot;
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> Repository Root Path: &quot;</span><span style="color:#a3be8c;">/var/lib/gitea/git/repositories</span><span>&quot;
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> Data Root Path: &quot;</span><span style="color:#a3be8c;">/var/lib/gitea</span><span>&quot;
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> Custom File Root Path: &quot;</span><span style="color:#a3be8c;">/var/lib/gitea/custom</span><span>&quot;
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> Work directory: &quot;</span><span style="color:#a3be8c;">/var/lib/gitea</span><span>&quot;
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> Log Root Path: &quot;</span><span style="color:#a3be8c;">/var/lib/gitea/data/log</span><span>&quot;
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[2]</span><span> Check if there is garbage storage files
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[3]</span><span> Check Database Version
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[4]</span><span> Check consistency of database
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[5]</span><span> Check if user with wrong type exist
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[6]</span><span> Check if OpenSSH authorized_keys file is up-to-date
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[7]</span><span> Check if SCRIPT_TYPE is available
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> ScriptType bash is on the current PATH at /bin/bash
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[8]</span><span> Check if hook files are up-to-date and executable
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[9]</span><span> Recalculate Stars number for all user
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[10]</span><span> Check old archives
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> 0 old archives in repository need to be deleted
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[11]</span><span> Enable push options
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> Checked 1 repositories, 0 need updates.
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[12]</span><span> Check for incorrectly dumped repo_units (See </span><span style="color:#65737e;">#16961)
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>W</span><span style="color:#b48ead;">]</span><span> Found 0 broken repo_units
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[13]</span><span> Recalculate merge bases
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>W</span><span style="color:#b48ead;">]</span><span> 0 PRs with incorrect mergebases of 0 PRs total in 1 repos
</span><span style="color:#bf616a;">OK
</span><span style="color:#bf616a;">[14]</span><span> Check git-daemon-export-ok files
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>I</span><span style="color:#b48ead;">]</span><span> Checked 1 repositories, 0 need updates.
</span></code></pre>
<h3 id="what-does-the-doctor-know">What does the doctor know?<a class="zola-anchor" href="#what-does-the-doctor-know" aria-label="Anchor link for: what-does-the-doctor-know"
><span class="anchor-icon">#</span></a
>
</h3>
<p>Although the <code>doctor</code> can be compared to <a href="https://en.wikipedia.org/wiki/Fsck">fsck(8)</a>, it does not know everything. It took decades for <code>fsck</code> to become the ultimate authority on finding problems on file systems and reliably fixing them without losing data. Nowadays, only a handful of people in the world are brave enough to manually attempt a file system recovery when <code>fsck</code> cannot recover from a data loss.</p>
<p>The first <code>doctor</code> version is two years old and Gitea admins are still routinely running SQL queries against the database or moving files around when trying to figure out why a Gitea instance is not behaving as it should. It is however worth checking if the doctor does not already have a solution by listing all it can do:</p>
<pre data-lang="bash" style="background-color:#2b303b;color:#c0c5ce;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">$</span><span> docker exec gitea gitea doctor</span><span style="color:#bf616a;"> --list
</span><span style="color:#bf616a;">Default</span><span> Name Title
</span><span style="color:#bf616a;">*</span><span> paths Check paths and basic configuration
</span><span> </span><span style="color:#bf616a;">storages</span><span> Check if there is garbage storage files
</span><span style="color:#bf616a;">*</span><span> check-db-version Check Database Version
</span><span> </span><span style="color:#bf616a;">check-db-consistency</span><span> Check consistency of database
</span><span style="color:#bf616a;">*</span><span> check-user-type Check if user with wrong type exist
</span><span style="color:#bf616a;">*</span><span> authorized-keys Check if OpenSSH authorized_keys file is up-to-date
</span><span> </span><span style="color:#bf616a;">script-type</span><span> Check if SCRIPT_TYPE is available
</span><span> </span><span style="color:#bf616a;">hooks</span><span> Check if hook files are up-to-date and executable
</span><span> </span><span style="color:#bf616a;">recalculate-stars-number</span><span> Recalculate Stars number for all user
</span><span> </span><span style="color:#bf616a;">check-old-archives</span><span> Check old archives
</span><span> </span><span style="color:#bf616a;">enable-push-options</span><span> Enable push options
</span><span> </span><span style="color:#bf616a;">fix-broken-repo-units</span><span> Check for incorrectly dumped repo_units (See </span><span style="color:#65737e;">#16961)
</span><span> </span><span style="color:#bf616a;">recalculate-merge-bases</span><span> Recalculate merge bases
</span><span> </span><span style="color:#bf616a;">check-git-daemon-export-ok</span><span> Check git-daemon-export-ok files
</span></code></pre>
<p>And then call the <code>check</code> that looks interesting:</p>
<pre data-lang="bash" style="background-color:#2b303b;color:#c0c5ce;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">$</span><span> docker exec gitea gitea doctor</span><span style="color:#bf616a;"> --run</span><span> authorized-keys
</span><span style="color:#bf616a;">[1]</span><span> Check if OpenSSH authorized_keys file is up-to-date
</span><span style="color:#bf616a;">OK
</span></code></pre>
<p>The challenge is to figure out which <code>check</code> does what and at the moment the best source of information is ... <a href="https://github.com/go-gitea/gitea/tree/v1.16.8">the sources</a> themselves. The <a href="https://github.com/go-gitea/gitea/blob/v1.16.8/cmd/doctor.go">doctor.go</a> command is the entry point and <a href="https://github.com/go-gitea/gitea/tree/v1.16.8/modules/doctor">the doctor directory</a> contains the rest.</p>
<p>Some <code>checks</code> are straightforward to understand, even if you do not know Go, such as <a href="https://github.com/go-gitea/gitea/blob/v1.16.8/modules/doctor/authorizedkeys.go">the authorized-keys check</a>. Others are much more involved and your best chance is to <a href="https://matrix.to/#/#gitea:matrix.org">ask the Gitea chatroom</a> for help.</p>
<h3 id="is-it-going-to-hurt">Is it going to hurt?<a class="zola-anchor" href="#is-it-going-to-hurt" aria-label="Anchor link for: is-it-going-to-hurt"
><span class="anchor-icon">#</span></a
>
</h3>
<p>By default the doctor (very much like <code>fsck -N</code>) only performs non destructive checks and displays diagnostics, with an indication of how serious the problem is. In the example above, there only are lines with <strong>[I]</strong> (which indicates an information) and <strong>[W]</strong> which indicates a warning that can be ignored but may be worth looking into. Those two warnings are actually just informational and should be labelled as <strong>[I]</strong>, <a href="https://github.com/go-gitea/gitea/pull/19836">which has been fixed</a> in a more recent version of the doctor.</p>
<p>Now let's do something bad: remove the permissions from a hook in our repository:</p>
<pre data-lang="bash" style="background-color:#2b303b;color:#c0c5ce;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">$</span><span> docker exec gitea chmod</span><span style="color:#bf616a;"> -x</span><span> /var/lib/gitea/git/repositories/root/test.git/hooks/post-receive
</span></code></pre>
<p>Run the doctor with the <code>check</code> supposed to find that out:</p>
<pre data-lang="bash" style="background-color:#2b303b;color:#c0c5ce;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">$</span><span> docker exec gitea gitea doctor</span><span style="color:#bf616a;"> --run</span><span> hooks
</span><span style="color:#bf616a;">[1]</span><span> Check if hook files are up-to-date and executable
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>W</span><span style="color:#b48ead;">]</span><span> old hook file /var/lib/gitea/git/repositories/root/test.git/hooks/post-receive is not executable
</span></code></pre>
<p>Ask it to fix this with the <code>--fix</code> flag:</p>
<pre data-lang="bash" style="background-color:#2b303b;color:#c0c5ce;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">$</span><span> docker exec gitea gitea doctor</span><span style="color:#bf616a;"> --run</span><span> hooks</span><span style="color:#bf616a;"> --fix
</span><span style="color:#bf616a;">[1]</span><span> Check if hook files are up-to-date and executable
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>W</span><span style="color:#b48ead;">]</span><span> Regenerated hooks for root/test
</span><span> </span><span style="color:#bf616a;">- </span><span style="color:#b48ead;">[</span><span>W</span><span style="color:#b48ead;">]</span><span> old hook file /var/lib/gitea/git/repositories/root/test.git/hooks/post-receive is not executable
</span></code></pre>
<p>And run it one last time to check all is well:</p>
<pre data-lang="bash" style="background-color:#2b303b;color:#c0c5ce;" class="language-bash "><code class="language-bash" data-lang="bash"><span style="color:#bf616a;">$</span><span> docker exec gitea gitea doctor</span><span style="color:#bf616a;"> --run</span><span> hooks
</span><span style="color:#bf616a;">[1]</span><span> Check if hook files are up-to-date and executable
</span><span style="color:#bf616a;">OK
</span></code></pre>
<p>Even when the doctor is unable to fix a problem, it can help by showing extensive debug output which can be found, by default, in the <code>doctor.log</code> file in the directory from which it runs. Or it can be displayed on the standard output with <code>--log-file -</code>, which is most convenient when running in docker.</p>
<h3 id="going-further">Going further<a class="zola-anchor" href="#going-further" aria-label="Anchor link for: going-further"
><span class="anchor-icon">#</span></a
>
</h3>
<p>If that was helpful to you, I would very much appreciate if you <a href="https://mastodon.online/@dachary">send me a message on Mastodon</a>. It will encourage me to write more blog posts to share what I learn about Gitea. Even better: you could <a href="https://github.com/go-gitea/gitea/pulls">send a pull request</a> to improve the doctor and help it mature.</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/tutorial">#tutorial</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

753
blog/index.html Normal file
View File

@ -0,0 +1,753 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Posts | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="The Gna! Blog: we write about Forgejo, Free Software and the general forge ecosystem" />
<meta property="og:title" content="Posts | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="The Gna! Blog: we write about Forgejo, Free Software and the general forge ecosystem" />
<meta
property="og:site_name"
content="Posts | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="blog__container">
<h1 class="blog__title">Posts</h1>
<p>Gna! is a <a href="https://gna.org/forgejo-clinic">Clinic</a> to get help when a Forgejo instance throws errors after an upgrade and the admin is not sure how to troubleshoot the problem. It opened in May 2022 and welcomes new patients. It will also provide dedicated Forgejo hosting, including CI and more: subscribe <a href="https://hostea.org/blog/atom.xml">to the blog</a> or the <a rel="me" href="https://mastodon.online/@hostea">Mastodon account</a> to keep up to date.</p>
<ul class="blog__list">
<li class="blog__post-item">
<a href="https://gna.org/blog/1-17-2-migration-security/" class="blog__post-link">
<h2 class="blog__post-title">[security] Gitea &lt; 1.17.2 bypassing URL restrictions during migration explained</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 24
October
,
2022 &middot; <b>2 min read</b>
</p>
<p class="blog__post-description">Prior to Gitea 1.17.2 a malicious Gitea server could be used to request local files using the migration web interface or the REST API. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/security">#security</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/solution">#solution</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/1-17-3-git-security/" class="blog__post-link">
<h2 class="blog__post-title">[security] Gitea &lt; 1.17.3 git option injection explained</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 17
October
,
2022 &middot; <b>2 min read</b>
</p>
<p class="blog__post-description">Prior to Gitea 1.17.3 the web interface that displays the commit graph could be used to inject git options used by the Gitea server. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/security">#security</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/solution">#solution</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/1-17-breaking-episode-2/" class="blog__post-link">
<h2 class="blog__post-title">1.17 breaking changes episode 2: preserving a custom gitconfig</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 20
July
,
2022 &middot; <b>2 min read</b>
</p>
<p class="blog__post-description">The location of the gitconfig file used by Gitea moved twice, here is a guide to sort out why and how to deal with it. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/tutorial">#tutorial</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/experimental/" class="blog__post-link">
<h2 class="blog__post-title">Get a Gitea instance with CI at Gna!</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 10
July
,
2022 &middot; <b>5 min read</b>
</p>
<p class="blog__post-description">It is now possible to rent a Gitea instance by the month, with Woodpecker CI. A self-hostable hosting solution supported by a horizontal collective of individuals and organizations. 25% of the income is dedicated to help the Free Software projects it depends on such as Gitea, Enough, Django, etc. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/federation">#federation</a>
<a class="blog__post-tag" href="/tags/forgefriends">#forgefriends</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/1-17-breaking-episode-1/" class="blog__post-link">
<h2 class="blog__post-title">1.17 breaking changes episode 1: preserving a custom gitconfig</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 22
June
,
2022 &middot; <b>2 min read</b>
</p>
<p class="blog__post-description">The location of the gitconfig file used by Gitea moved and custom modifications must be manually moved as well. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/tutorial">#tutorial</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/gentle-introduction-to-the-doctor/" class="blog__post-link">
<h2 class="blog__post-title">[tutorial] A gentle introduction to the gitea doctor</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 14
June
,
2022 &middot; <b>7 min read</b>
</p>
<p class="blog__post-description">The doctor command is useful to check the health of a running Gitea instance. Specially after performing an upgrade. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
<a class="blog__post-tag" href="/tags/tutorial">#tutorial</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/zombies-part-2/" class="blog__post-link">
<h2 class="blog__post-title">[solved] Zombies created by Gitea</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 4
June
,
2022 &middot; <b>3 min read</b>
</p>
<p class="blog__post-description">Gitea can use process groups to kill its children using a negative PID to never create zombies. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/zombies/" class="blog__post-link">
<h2 class="blog__post-title">[diagnostic] Zombies created by Gitea</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 2
June
,
2022 &middot; <b>4 min read</b>
</p>
<p class="blog__post-description">An increasing number of zombies processes are created by Gitea because it only kills its direct children on timeout. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/path-not-found/" class="blog__post-link">
<h2 class="blog__post-title">[solved] Gitea 1.15 and up: path not found or permission denied</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 28
May
,
2022 &middot; <b>3 min read</b>
</p>
<p class="blog__post-description">After migrating from 1.15 or earlier to gitea 1.16 paths are no longer found and files cannot be created because of permission problems because the default example.ini file changed. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/unsafe-repository-is-owned-by-someone-else/" class="blog__post-link">
<h2 class="blog__post-title">[solved] Gitea 1.16.[678] error: fatal: unsafe repository is owned by someone else</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 15
May
,
2022 &middot; <b>4 min read</b>
</p>
<p class="blog__post-description">If Gitea runs as user git, calls a patched Git version and a parent directory of the git repositories is owned by a user other than git, it will fail. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/blank-or-error-500-page-after-login/" class="blog__post-link">
<h2 class="blog__post-title">[solved] blank or error 500 page after login</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 8
May
,
2022 &middot; <b>6 min read</b>
</p>
<p class="blog__post-description">After going to production, some Gitea users saw a blank page after login and had to manually type the URL of the project they wanted to see in the browser. </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/22-04-2022-hostea-introducing-hostea-forgefriends-monthly-meet/" class="blog__post-link">
<h2 class="blog__post-title">Introducing Gna!</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;batsense.net" class="post__author">Aravinth Manivannan</a>
&middot; 22
April
,
2022 &middot; <b>1 min read</b>
</p>
<p class="blog__post-description">Introducing Hostea, a project Loïc Dachary and Aravinth Manivannan are working on to create a 100% Free software development suite, complete with CI/CD, static pages and gists </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/hostea">#hostea</a>
<a class="blog__post-tag" href="/tags/forgefriends">#forgefriends</a>
</div>
</li>
<li class="blog__post-item">
<a href="https://gna.org/blog/project-plans-for-hosted-gitea-online-service/" class="blog__post-link">
<h2 class="blog__post-title">Project plans for a hosted Gitea online service</h2>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 18
April
,
2022 &middot; <b>11 min read</b>
</p>
<p class="blog__post-description">When an organization asks me about Gitea, I would like to direct them to a provider where they can rent an instance and just use it </p>
</a>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/free-software">#free-software</a>
<a class="blog__post-tag" href="/tags/free-software-sustainability">#free-software-sustainability</a>
</div>
</li>
</ul>
</div>
<link rel="alternate" type="application/rss+xml" title="RSS" href="https://gna.org/rss.xml">
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

1
blog/main.css Normal file
View File

@ -0,0 +1 @@
.blog__content img{max-width:100%;display:block}.blog__content video{max-width:100%;display:block}.blog__content li{margin-left:40px}.blog__content a:hover{color:#0056b3;text-decoration:underline}.blog__content code{word-wrap:break-word;overflow-wrap:break-word}.blog__content table{border-collapse:collapse;caption-side:bottom;border-color:#e9ecef;text-align:center;width:100%}.blog__content table>thead{vertical-align:bottom;border-bottom:1px solid #cdc8ca;text-align:center}.blog__content table th{text-align:center}.blog__content table td{margin:auto;padding:10px;border-bottom:1px solid #edddd1}.blog__content p,.blog__content h2,.blog__content h3{margin:10px 0}.blog__content pre{padding:10px 10px 10px 20px;border-radius:8px;font-size:0.95rem;overflow:auto}.blog__content pre{font-family:monospace, monospace;font-display:auto;font-size:1em}.blog__content p{margin:30px 0}.blog__container{margin:auto;max-width:50%}.blog__list{list-style:none}.blog__post-link,.blog__post-link:visited{text-decoration:none;color:inherit}.blog__title{margin:35px 0}.blog__post-link{display:block}.blog__post-item{border-bottom:1px dashed #333;margin:10px;padding:10px}.blog__post-item:hover{background-color:lightgray}.blog__post-item:last-child{border-bottom:none}.blog__post-description{font-size:0.9rem;margin:5px 0}.blog__post-tag{font-size:0.7rem;font-family:monospace, monospace}.blog__post-tag:hover{color:#0056b3;text-decoration:underline}.blog__post-meta{font-size:0.7rem}.blog__post-title{font-size:1.4rem;font-weight:550}.blog__post-tag-container{margin:0}

1
blog/mobile.css Normal file
View File

@ -0,0 +1 @@
.blog__container{max-width:95%}.blog__content table{overflow-x:scroll}.blog__content table td{padding:5px}.blog__content pre{white-space:pre-wrap;word-wrap:break-word}.blog__content li{margin-left:25px}.blog__content p,.blog__content h1,.blog__content h2,.blog__content h3{margin:20px 0px}

View File

@ -0,0 +1,326 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>[solved] Gitea 1.15 and up: path not found or permission denied | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="After migrating from 1.15 or earlier to gitea 1.16 paths are no longer found and files cannot be created because of permission problems because the default example.ini file changed." />
<meta property="og:title" content="[solved] Gitea 1.15 and up: path not found or permission denied | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="After migrating from 1.15 or earlier to gitea 1.16 paths are no longer found and files cannot be created because of permission problems because the default example.ini file changed." />
<meta
property="og:site_name"
content="[solved] Gitea 1.15 and up: path not found or permission denied | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">[solved] Gitea 1.15 and up: path not found or permission denied</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 28
May
,
2022 &middot; <b>3 min read</b>
</p>
<div class="blog__content">
<p>In Gitea 1.15 the <a href="https://github.com/go-gitea/gitea/blob/cfb4c23a5009b9c236d48ac0bc156577c7d70741/custom/conf/app.example.ini">app.example.ini</a> file was changed to <a href="https://github.com/go-gitea/gitea/commit/4a84022d2559ccfc99960c7c654ee8b9b38664f7">comment out most of the values</a>. The assumption was that all values exactly matched the defaults <a href="https://github.com/go-gitea/gitea/blob/main/modules/setting/setting.go">in the source code</a>. However, there are differences, for instance for <a href="https://github.com/go-gitea/gitea/blob/cfb4c23a5009b9c236d48ac0bc156577c7d70741/modules/setting/setting.go#L771">APP_DATA_PATH</a>. Before Gitea 1.15, <code>app.example.ini</code> contained:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>APP_DATA_PATH = data
</span></code></pre>
<p>and the path was relative to the <strong>directory from which the Gitea server was running</strong>. In Gitea 1.15 up to 1.16, it was commented out:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>; APP_DATA_PATH = data
</span></code></pre>
<p>and the path was relative to the <strong>work path directory</strong>, as provided either via the --work-path argument or the <code>GITEA_WORK_DIR</code> environment variable. </p>
<p>When a distribution such as voidlinux <a href="https://github.com/void-linux/void-packages/blob/master/srcpkgs/gitea/patches/config.patch">uses app.example.ini</a> as a base for the Gitea package, this change indirectly creates a regression and an upgrade of Gitea <a href="https://github.com/go-gitea/gitea/issues/19367">fails with errors</a> such as <code>unable to open level db at data/data/queues/common: mkdir data: permission denied</code>. The regression did not show as soon as Gitea 1.15 became available in voidlinux because the package <a href="https://github.com/void-linux/void-packages/blob/7fc9190f0e0d557dd5031e68df4e183892d4315b/srcpkgs/gitea/patches/config.patch#L62">explicitly set <code>APP_DATA_PATH</code></a>. But this <a href="https://github.com/void-linux/void-packages/commit/19d986a2cae9ce73d32552ddb62443b5e7fa13e2">changed when Gitea 1.15.6 was packaged</a> and once the value was commented out, upgrading triggered the problem. This was worked around six month later with the <a href="https://github.com/void-linux/void-packages/commit/44b6c96fa12ce9d993c7a2ac9486d892735b7e3a">Gitea 1.16.8</a> package.</p>
<p>The <code>APP_DATA_PATH</code> directory is not the only one, the <code>[log] ROOT_PATH</code> is another example. There is an <a href="https://github.com/go-gitea/gitea/pull/19815">ongoing effort</a> to improve the situation in Gitea 1.17. With the downside of introducing breaking changes that will have an impact on all Gitea installations because the content of the <code>app.ini</code> file will be interpreted differently. In the case of <code>APP_DATA_PATH</code>, both:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>APP_DATA_PATH = data
</span></code></pre>
<p>and:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>; APP_DATA_PATH = data
</span></code></pre>
<p>will be interpreted to be relative to the <strong>work path directory</strong>, as provided either via the --work-path argument or the <code>GITEA_WORK_DIR</code> environment variable. Every Gitea installation using <strong>APP_DATA_PATH = data</strong> will need to update the value to be an absolute path such as <strong>/var/lib/gitea/data</strong> so that it keeps pointing to the expected directory.</p>
<p>In order to prepare for the change or ensure the consistency of all path, there fortunately is a very simple <strong>solution: always use absolute paths in the <code>app.ini</code> configuration file</strong>.</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,529 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Project plans for a hosted Gitea online service | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="When an organization asks me about Gitea, I would like to direct them to a provider where they can rent an instance and just use it" />
<meta property="og:title" content="Project plans for a hosted Gitea online service | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="When an organization asks me about Gitea, I would like to direct them to a provider where they can rent an instance and just use it" />
<meta
property="og:site_name"
content="Project plans for a hosted Gitea online service | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">Project plans for a hosted Gitea online service</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 18
April
,
2022 &middot; <b>11 min read</b>
</p>
<div class="blog__content">
<p><em>This post was originally published on <a href="https://blog.dachary.org/2022/02/16/project-plans-for-a-hosted-gitea-online-service/">Loïc Dachary's
blog</a>.</em></p>
<hr />
<p>When an organization asks me about Gitea, I would like to direct them to
a provider where they can rent an instance and just use it, in the same
way they can go to https://discourse.org for a forum, or
https://nextcloud.com for storage. Instead of waiting for that to
happen, <a href="https://batsense.net/about/">Aravinth</a> and
<a href="https://dachary.org/">myself</a> decided to do something about it, in a
way that is in line with our shared values: transparency and Free
Software.</p>
<p>After doing some research we found counter examples that showed the
pitfalls to avoid. GitLab because its business model heavily relies on
selling proprietary licenses. CiviCRM because setting it up is complex
and requires training: users can't figure it out on their own. Gitea
images provided by Digital Ocean because they do not include security
upgrades. MySQL configured and run by AWS because of the vendor lock-in
that makes it impossible to self-host.</p>
<p>We concluded that an online service such as Gitea can be hosted in a
sustainable way as long as:</p>
<ul>
<li>It is well maintained and upgrades itself</li>
<li>It can be self-hosted</li>
<li>The service can automatically be restored from backups when the
underlying resources fail</li>
</ul>
<p>GitHub and GitLab make it look like there is a market around software
forges. It is however impossible to figure out if this market exists
only because it is based on proprietary software. How many of these
customers would pay for a Free Software hosted Gitea instance?</p>
<p>Even if these customers do exist, a new service provider would have to
figure out how to convince them to subscribe. The technical development
of the service can be done within weeks but building a sustainable
business takes much longer. Again, there were examples of what can go
wrong, for instance ElasticSearch. After years of work developing a
successful online service and a customer base, AWS entered the
competition and started to take it away from them.</p>
<p>The sustainability of the Free Software ecosystem is a new and very
difficult problem to solve. It is discussed more than it ever was in the
wake of security breaches originating from widely used and yet abandoned
library or disillusioned Free Software authors self-sabotaging their
next release, and everyone has diverging opinions. It falls on each Free
Software author to spend time to think about their own projects because
there are no handbook or good examples to follow. That is what Aravinth
and myself did to find a semblance of clarity and decide how to go about
this hosted Gitea service idea.</p>
<h1 id="sustaining-free-software-online-services">Sustaining Free Software online services<a class="zola-anchor" href="#sustaining-free-software-online-services" aria-label="Anchor link for: sustaining-free-software-online-services"
><span class="anchor-icon">#</span></a
>
</h1>
<h2 id="more-mature-online-services-mean-less-opportunities-to-sell-services">More mature online services mean less opportunities to sell services<a class="zola-anchor" href="#more-mature-online-services-mean-less-opportunities-to-sell-services" aria-label="Anchor link for: more-mature-online-services-mean-less-opportunities-to-sell-services"
><span class="anchor-icon">#</span></a
>
</h2>
<p>Ideally the software running an online service is rock solid and bugs
are so rare that it can run unattended. This is true of
https://wordpress.org and it is not uncommon for an instance to run for
years while upgrading themselves to get security patches. The cost of
maintaining such a service is negligible and hosting companies can offer
it for free to their customers. They make their profit by renting the
machines on which the service runs.</p>
<p>When the software is not as mature, it is more expensive to run. Bugs
need fixing, upgrades require manual intervention, users must be trained
to overcome the complexity of the user experience, etc. Well known
examples are Discourse or CiviCRM for which companies sell services to
overcome these issues.</p>
<p>But when an organization is both the author of the software and the
provider of paid services to compensate for its lack of maturity, it
creates a conflict of interest. Should they focus their effort on making
the software more mature, they would harm a business model that is based
on this very lack of maturity. For instance, if the author of a software
also sells training courses, they are not motivated to solve user
experience issues. If they did, it would lower the need for training
courses and reduce their income.</p>
<h2 id="free-software-online-services-in-the-wake-of-the-sustainability">Free Software online services in the wake of the sustainability<a class="zola-anchor" href="#free-software-online-services-in-the-wake-of-the-sustainability" aria-label="Anchor link for: free-software-online-services-in-the-wake-of-the-sustainability"
><span class="anchor-icon">#</span></a
>
</h2>
<p>crisis</p>
<p>Nowadays all Free Software authors struggle to get enough resources to
produce a steady stream of releases, even when the project is very
popular. This sustainability problem is getting more and more attention
as the number of Free Software projects in use world wide keeps growing.
Even the simplest online service relies on thousands of Free Software
projects, each of which needs work to keep going. Accidents caused by
poorly maintained Free Software projects become more frequent.</p>
<p>This Free Software sustainability crisis is barely emerging and very
much resembles ecological problems such as climate change. In both cases
it is very difficult to figure out how to properly care for the
resources that are consumed. After decades of advocacy, it is generally
accepted that fossil energy won't last forever but there still is a long
way to go. It will also take a long time for the Free Software community
to answer this simple question: how to sustain an ever growing library
of Free Software?</p>
<p>Luckily, it is relatively simpler to solve that problem for an online
service because it has users. They can be reminded that their assistance
is needed to keep the project afloat, for instance by a donation. A
proposition that would be much more difficult to make for the author of
a cryptographic library. Convincing users to pay for an online service
has the best chance of success when the author of the software is also
the service provider. This is the business model of Discourse and
Weblate, but it is relatively fragile because nothing stands in the way
of the competition.</p>
<p>A few years ago ElasticSearch successfully developed an online service
offering. But when AWS entered the competition and was better at
marketing it, ElasticSearch quickly realized they would likely go out of
business. They tried to fight back by <a href="https://www.elastic.co/blog/licensing-change">changing their
license</a>, which was the
wrong answer to a real problem. Discourse or Weblate are also likely to
face competition from hosting companies in the future and they may not
survive it.</p>
<p>In the end, the durable source of income for a Free Software online
service is to rent the resources (CPU/RAM/network/disk) it needs to run.
In other words only hosting companies can make a profit when running
such an online service. And for that reason they also need to share part
of the profits to ensure the sustainability of the Free Software service
their customers need.</p>
<h1 id="online-services-vendor-lock-in-is-cured-by-free-software">Online services vendor lock-in is cured by Free Software<a class="zola-anchor" href="#online-services-vendor-lock-in-is-cured-by-free-software" aria-label="Anchor link for: online-services-vendor-lock-in-is-cured-by-free-software"
><span class="anchor-icon">#</span></a
>
</h1>
<p>When hosting companies offer online services they also provide upgrades
and transparent recovery when the hardware fails. But none of them allow
the service to be self-hosted. When their price policy change, or when
the term of services ban users from a given country, migrating the
service elsewhere it costly and difficult. For instance when AWS runs
MySQL for their customers, they allow to download the data but not the
software that runs the proprietary AWS interface used to configure and
control the server. Another example is GitHub where the content of the
git repository can be downloaded but the code that runs GitHub itself is
not Free Software.</p>
<p>If a customer cannot run the same software as their service provider,
they are locked-in, even if they can download their data. It is a common
misconception to think that there is no vendor lock-in as long as it is
possible to download the data in an standard format. Migrating the data
from one software to another is, more often than not, time consuming and
costly to a point that it is effectively a blocker. A GitHub salesperson
would argue that it is possible for people to run GitHub Enterprise on
their own hardware. But the vendor lock-in is still present via the
proprietary license contract. The user experience, maintenance and
upgrades are still exclusively controlled by GitHub.</p>
<p>To guarantee their independence, the customers of an online service need
to be able to:</p>
<ul>
<li>Download their data</li>
<li>Run the exact same Free Software as their service provider</li>
<li>Run the exact same Free Software infrastructure as code as their
service provider</li>
</ul>
<p>The requirement regarding Free Software infrastructure as code refers
to, for instance, the AWS control panel and all that is behind it when
creating a new MySQL service. It includes whatever a competitor would
need to run the same online service. An example would be
https://enough.community, an infrastructure as code dedicated to
creating the services needed by whistleblowers and human rights
defenders. It consumes resources rented by hosting providers, assembles
disks and machines, setup monitoring and intrusion detection, installs
various online services and upgrades them.</p>
<p>The availability of the software that creates the infrastructure is not
only useful to the competitors of a service provider. It also benefits a
non-profit that wants to provide (for instance) Wordpress instances to
its members. Without it they would need to create something from scratch
using building blocks such as CiviCRM. Even though such building blocks
exist, this is a significant undertaking and effectively a blocker.</p>
<h1 id="federated-online-services-and-durability">Federated online services and durability<a class="zola-anchor" href="#federated-online-services-and-durability" aria-label="Anchor link for: federated-online-services-and-durability"
><span class="anchor-icon">#</span></a
>
</h1>
<p>All self-hosted services are in danger of losing the data they contain.
When a Wordpress service is hosted in a home and the machine dies, it
must be restored from backups... when there are backups. Hosting
companies ensure the durability of the data with their own backup
system. It creates a dilemma for people who are looking into self
hosting: independence is desirable, but is it worth taking the risk of
data loss?</p>
<p>Federated online services do not suffer from this problem, because they
can mirror each other. A Gitea instance that is federated with another
will mirror copies of software projects found on its peers. Should one
instance be destroyed, mirrored projects can be resurrected from the
federated instance. Not only is it a practical way to ensure the (rare)
failure of an entire datacenter, it also helps with the (more frequent)
destruction of self-hosted machines. Contrary to backups that require
special attention, the replication involved in federated online service
is built in and works continuously. There is no need for an extra backup
service that is very rarely used and therefore likely to fail when
needed.</p>
<p>Federated services are not yet mainstream and Gitea is one of the rare
services that started to implement the concept. In the interim,
customers of an online hosting service will need to worry about backups
to ensure the durability of their data. But the ultimate solution for
them won't be the emergence of an ideal backup infrastructure, it will
be replication (via federated services) that will continuously ensure
the durability of their data.</p>
<h1 id="paths-forward">Paths forward<a class="zola-anchor" href="#paths-forward" aria-label="Anchor link for: paths-forward"
><span class="anchor-icon">#</span></a
>
</h1>
<p>The Gitea project itself, following the footsteps of Discourse or
Weblate, could provide a hosting service. Part of its current user base
may become customers and there does not seem to be any blocker to make
that happen. As with most successful Free Software project, people
working on Gitea daily are already very busy and cannot engage in such a
long term project. But Aravinth and myself can, if they will have us.</p>
<p>Another path forward would be to wrap Gitea into a bundle that existing
hosting companies could easily use to provide such a service to their
customers. The biggest hosting companies are unlikely to be interested:
if Digital Ocean was to provide upgrades on top of their existing Gitea
image, they are more likely to rely on their internal staff to implement
that from scratch, as proprietary software integrated into their
existing infrastructure. But smaller hosting companies such as
https://Octopuce.fr or https://Easter-Eggs.com, who already deploy Gitea
instances for their customers, would use it if, for instance, it helped
with the upgrades. They would then kindly be reminded to give back a
share of their profits in order to sustain the development of the
service they deploy.</p>
<p>Finally it would also be possible to follow the example of GitLab in the
early days (before it turned to proprietary software) or Codeberg and
offer a free shared forge hosting service to build a user base. After a
few years, a percentage of the user base would convert to being paid
customers or donors to sustain the activity and part of the income would
be used to sustain the development of the service.</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/free-software">#free-software</a>
<a class="blog__post-tag" href="/tags/free-software-sustainability">#free-software-sustainability</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,346 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>[solved] Gitea 1.16.[678] error: fatal: unsafe repository is owned by someone else | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="If Gitea runs as user git, calls a patched Git version and a parent directory of the git repositories is owned by a user other than git, it will fail." />
<meta property="og:title" content="[solved] Gitea 1.16.[678] error: fatal: unsafe repository is owned by someone else | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="If Gitea runs as user git, calls a patched Git version and a parent directory of the git repositories is owned by a user other than git, it will fail." />
<meta
property="og:site_name"
content="[solved] Gitea 1.16.[678] error: fatal: unsafe repository is owned by someone else | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">[solved] Gitea 1.16.[678] error: fatal: unsafe repository is owned by someone else</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 15
May
,
2022 &middot; <b>4 min read</b>
</p>
<div class="blog__content">
<p>April 12, 2022 version <a href="https://lore.kernel.org/git/xmqqv8veb5i6.fsf@gitster.g/">git v2.35.2</a> was released and addresses a security issue <a href="https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2">CVE-2022-24765</a>. It was backported to 2.30.3, v2.31.2, v2.32.1, v2.33.2, and v2.34.2 and published by distributions such as <a href="https://security-tracker.debian.org/tracker/CVE-2022-24765">Debian GNU/Linux</a>, <a href="https://www.alpinelinux.org/releases/">Alpine</a>.</p>
<p><strong>If Gitea runs as user <code>foo</code>, calls a patched Git version and a parent directory of the git repositories is owned by a user other than <code>foo</code>, it will fail</strong> with a message such as:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>Failed to open repository: Git/Data Error: exit status 128 - fatal: unsafe repository (&#39;/data/git/repositories/git/data.git&#39; is owned by someone else)
</span></code></pre>
<p>This started to show in the past few weeks to <a href="https://github.com/go-gitea/gitea/issues/19455">users running the Gitea binary on Windows</a> who also independently installed git v2.36. And then to people running <a href="https://github.com/go-gitea/gitea/issues/19455#issuecomment-1106331149">Gitea from snap</a>, on <a href="https://github.com/go-gitea/gitea/issues/19455#issuecomment-1106312061">a Synology NAS</a> and then people running from <a href="https://github.com/go-gitea/gitea/blob/main/Dockerfile#L2">Gitea docker images</a> which is based on <a href="https://www.alpinelinux.org/releases/">Alpine</a>.</p>
<h3 id="workarounds">Workarounds<a class="zola-anchor" href="#workarounds" aria-label="Anchor link for: workarounds"
><span class="anchor-icon">#</span></a
>
</h3>
<ul>
<li>If using <a href="https://hub.docker.com/r/gitea/gitea">Gitea docker images</a>:
<ul>
<li>upgrade to <a href="https://github.com/go-gitea/gitea/pull/19876">Gitea &gt;=1.16.9</a> or 1.17, both have git &gt;=2.36</li>
<li><code>git config --global --replace-all safe.directory '*'</code></li>
</ul>
</li>
<li>If the Gitea binary was installed independently of git, upgrade git to a version that is <a href="https://git-scm.com/docs/git-config#Documentation/git-config.txt-safedirectory">greater or equal to 2.36</a> and disable the security check entirely with:
<ul>
<li>impersonate the <a href="https://docs.gitea.io/en-us/install-from-binary/#recommended-server-configuration">user dedicated to Gitea</a> (usually git)</li>
<li><code>git config --global --replace-all safe.directory '*'</code></li>
</ul>
</li>
</ul>
<h3 id="bug-fix">Bug fix<a class="zola-anchor" href="#bug-fix" aria-label="Anchor link for: bug-fix"
><span class="anchor-icon">#</span></a
>
</h3>
<p>The <a href="https://github.com/go-gitea/gitea/pull/19870">bug fix</a> is for Gitea to ensure <code>git config --global --replace-all safe.directory '*'</code> is set on its <a href="https://docs.gitea.io/en-us/install-from-binary/#recommended-server-configuration">dedicated user</a> when it initializes. It is effective on the condition that the git CLI version is <a href="https://git-scm.com/docs/git-config#Documentation/git-config.txt-safedirectory">greater or equal to 2.36</a>.</p>
<h3 id="bug-fix-rationale">Bug fix rationale<a class="zola-anchor" href="#bug-fix-rationale" aria-label="Anchor link for: bug-fix-rationale"
><span class="anchor-icon">#</span></a
>
</h3>
<p>It is safe to <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/merge_requests/50/diffs">disable the security check in Gitea</a>. It is not vulnerable to <strong><a href="https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2">CVE-2022-24765</a></strong> because it calls the git CLI <a href="https://github.com/go-gitea/gitea/blob/main/modules/git/command.go#L160">after changing its working directory</a> to be the git repository targeted by the command (for instance <a href="https://github.com/go-gitea/gitea/blob/main/modules/git/diff.go#L38-L45">diff</a>) or a temporary directory. Therefore <strong>it will not explore the parent directories looking for a git configuration file</strong>.</p>
<p>The security check is triggered because the repository is owned by an unexpected user (root instead of git typically) and <strong>not because a parent directory is owned by an unexpected user</strong>. This, in itself, is a problem worth investigating but it is unrelated and was revealed by the newer security check of git even though it does not match the threat described in <strong><a href="https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2">CVE-2022-24765</a></strong>.</p>
<p>It appears non trivial to enforce a consistent ownership of files and directories, either within docker or outside docker when networked file systems are involved. The Gitea server was not troubled by this inconsistency so far because the permissions allow it to write and read where expected, regardless of the owner. It is not worth looking into but it is ancient and unrelated.</p>
<p>Gitea runs under a dedicated user, either when installed <a href="https://docs.gitea.io/en-us/install-from-binary/#recommended-server-configuration">from binary</a> or from <a href="https://docs.gitea.io/en-us/install-with-docker/">docker</a> and <a href="https://github.com/go-gitea/gitea/blob/main/modules/git/git.go#L196-L207">modifies the global git configuration</a> depending on the git version at initialization time. Fixing the problem can therefore be done by <a href="https://lab.forgefriends.org/forgefriends/forgefriends/-/merge_requests/50/diffs#bcd72ff867cbd1ddd5b6518c3a05b5f1a6021286_209_209">disabling the security check in the global git config file at initialization time</a>. It also requires a minimum version of git 2.36 to be installed, which is the case for Gitea docker images with <a href="https://github.com/go-gitea/gitea/pull/19876">versions &gt;= 1.16.9</a>.</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/upgrade">#upgrade</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,362 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>[solved] Zombies created by Gitea | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Gitea can use process groups to kill its children using a negative PID to never create zombies." />
<meta property="og:title" content="[solved] Zombies created by Gitea | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="Gitea can use process groups to kill its children using a negative PID to never create zombies." />
<meta
property="og:site_name"
content="[solved] Zombies created by Gitea | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">[solved] Zombies created by Gitea</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 4
June
,
2022 &middot; <b>3 min read</b>
</p>
<div class="blog__content">
<p>Gitea can <a href="/blog/zombies">create zombies</a>, for instance if a Git mirror takes too long. When updating a mirror, Gitea relies on the <code>git remote update</code> command which creates a child process, <code>git-remote-https</code>, to fetch data from the remote repository. Gitea has an internal timeout that will kill the child process (e.g. <code>git remote update</code>) when it takes too long but will not kill the grandchild. This grandchild will become an orphan and run forever or until its own timeout expires, which is about two minutes on git version 2.25.</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>$ time git clone https://4.4.4.4
</span><span>Clonage dans &#39;4.4.4.4&#39;...
</span><span>fatal: impossible d&#39;accéder à &#39;https://4.4.4.4/&#39;: Failed to connect to 4.4.4.4 port 443: Connexion terminée par expiration du délai d&#39;attente
</span><span>
</span><span>real 2m9,753s
</span><span>user 0m0,001s
</span><span>sys 0m0,009s
</span></code></pre>
<p>As explained in the <a href="/blog/zombies/#killing-a-child-process-and-all-its-children">diagnostic blog post regarding Gitea zombies</a> there fortunately is a very simple way to avoid this by making sure each Gitea child is a <a href="https://en.wikipedia.org/wiki/Process_group">process group leader</a>. That first step was <a href="https://github.com/go-gitea/gitea/pull/19865">introduced in Gitea 1.17</a> and <a href="https://github.com/go-gitea/gitea/pull/19865">backported to Gitea 1.16.9</a>. The actual bug fix can now be implemented.</p>
<h3 id="using-negative-process-id-to-kill-children">Using negative process id to kill children<a class="zola-anchor" href="#using-negative-process-id-to-kill-children" aria-label="Anchor link for: using-negative-process-id-to-kill-children"
><span class="anchor-icon">#</span></a
>
</h3>
<p>When Gitea timeout on a child, it relies on <a href="https://github.com/golang/go/blob/f8a53df314e4af8cd350eedb0dae77d4c4fc30d0/src/os/exec/exec.go#L650">os.Process.Kill</a> which translates into a using the kill(2) system call to send a SIGKILL signal to unconditionally terminate it: <code>kill(pid, SIGKILL)</code>. Using a negative pid with <code>kill(-pid, SIGKILL)</code> will also terminate all processes created by Gitea's child, without Gitea knowing when or why they were created. From the kill(2) manual page:</p>
<blockquote>
<p>If pid is less than -1, then sig is sent to every process in the process group whose ID is -pid.</p>
</blockquote>
<p>Which is implemented as follows in the <a href="https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec.go#L130">Friendly Forge Format library</a>:</p>
<blockquote>
<p><code>syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)</code></p>
</blockquote>
<h3 id="not-using-the-default-go-commandcontext">Not using the default Go CommandContext<a class="zola-anchor" href="#not-using-the-default-go-commandcontext" aria-label="Anchor link for: not-using-the-default-go-commandcontext"
><span class="anchor-icon">#</span></a
>
</h3>
<p>Since <a href="https://pkg.go.dev/os/exec#CommandContext">CommandContext</a> does not allow to send a signal to the negative pid of the child process, it has to be implemented by Gitea itself, in a way that is similar to how the <a href="https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec.go#L75-82">Friendly Forge Format library</a> does it:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span> ctxErr := watchCtx(ctx, cmd.Process.Pid)
</span><span> err = cmd.Wait()
</span><span> interruptErr := &lt;-ctxErr
</span><span> // If cmd.Wait returned an error, prefer that.
</span><span> // Otherwise, report any error from the interrupt goroutine.
</span><span> if interruptErr != nil &amp;&amp; err == nil {
</span><span> err = interruptErr
</span><span> }
</span></code></pre>
<h3 id="testing-the-bug-is-fixed-and-stays-fixed">Testing the bug is fixed and stays fixed<a class="zola-anchor" href="#testing-the-bug-is-fixed-and-stays-fixed" aria-label="Anchor link for: testing-the-bug-is-fixed-and-stays-fixed"
><span class="anchor-icon">#</span></a
>
</h3>
<p>Long standing bugs that are difficult to reproduce manually such as this one require robust testing to ensure that:</p>
<ul>
<li>the diagnostic identifying the root cause is correct</li>
<li>the bug fix works</li>
<li>it does not resurface insidiously because of a subtle regression introduce years later</li>
</ul>
<p>It is easy to implement as can be seen in the <a href="https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L44-76">Friendly Forge Format library</a>. In a nutshell:</p>
<ul>
<li><a href="https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L53">git clone https://4.4.4.4</a> which will hang because of firewall rules</li>
<li><a href="https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L60-65">wait for the git-remote-https</a> grandchild process to be spawned</li>
<li><a href="https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L67-68">cancel the context and wait for the goroutine to terminate</a></li>
<li><a href="https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L70-75">verify the git-remote-https is killed</a></li>
</ul>
<p>And with that... no more zombies!</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

368
blog/zombies/index.html Normal file
View File

@ -0,0 +1,368 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>[diagnostic] Zombies created by Gitea | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="An increasing number of zombies processes are created by Gitea because it only kills its direct children on timeout." />
<meta property="og:title" content="[diagnostic] Zombies created by Gitea | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="An increasing number of zombies processes are created by Gitea because it only kills its direct children on timeout." />
<meta
property="og:site_name"
content="[diagnostic] Zombies created by Gitea | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">[diagnostic] Zombies created by Gitea</h1>
<p class="blog__post-meta">
<a href="https:&#x2F;&#x2F;dachary.org" class="post__author">Loïc Dachary</a>
&middot; 2
June
,
2022 &middot; <b>4 min read</b>
</p>
<div class="blog__content">
<p>The first <a href="https://github.com/go-gitea/gitea/issues/3242">issue about zombie processes</a> created by Gitea was reported in 2017 and <a href="https://github.com/go-gitea/gitea/issues/13987">resurfaced</a> on a <a href="https://github.com/go-gitea/gitea/issues/19077">regular basis</a>. Although it does not look pretty, zombie processes are leftovers that do not consume resources and never caused any kind of harm. Here is one scenario that will create a zombie:</p>
<ul>
<li>Gitea updates a mirror by spawning the process <code>git remote update</code></li>
<li><code>git remote update</code> spawns yet another process, <code>git fetch</code></li>
<li><code>git fetch</code> is stuck, for instance because of network problems, and Gitea eventually times out</li>
<li>Gitea kill the process <code>git remote update</code></li>
<li>When killed <code>git remote update</code> does not kill its own child and <code>git fetch</code> becomes an orphaned process which keeps running</li>
<li>When <code>git fetch</code> eventually completes it becomes a zombie because its original parent is no longer around to wait on it</li>
</ul>
<h3 id="pid-1-process-and-waiting-on-orphans">PID 1 process and waiting on orphans<a class="zola-anchor" href="#pid-1-process-and-waiting-on-orphans" aria-label="Anchor link for: pid-1-process-and-waiting-on-orphans"
><span class="anchor-icon">#</span></a
>
</h3>
<p>This scenario is not unique to Gitea and it is such a common pattern that safeguards have been implemented to mitigate the proliferation of zombies. Orphaned process are automatically attached to the process with PID 1, which is expected to wait on every process, whether it created them or not. When Gitea is installed from binary on GNU/Linux this is <code>/bin/init</code> and when Gitea runs from the <a href="https://github.com/go-gitea/gitea/blob/6171ea7d318c0ca8714bc6efd6a97ea4b495eb6d/Dockerfile">default docker image</a> this is <code>s6</code>: they will both wait on orphaned processes and there won't be any zombies.</p>
<h3 id="what-if-gitea-is-the-only-running-process">What if Gitea is the only running process?<a class="zola-anchor" href="#what-if-gitea-is-the-only-running-process" aria-label="Anchor link for: what-if-gitea-is-the-only-running-process"
><span class="anchor-icon">#</span></a
>
</h3>
<p>But when Gitea runs from the <a href="https://github.com/go-gitea/gitea/blob/6171ea7d318c0ca8714bc6efd6a97ea4b495eb6d/Dockerfile.rootless">rootless docker image</a>, Gitea is the only process running in the container. Orphaned processes will have Gitea as a parent but will not wait on them and they will stay in a zombie state forever. To reproduce this problem in a minimal way:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>$ docker run --name gitea -p 8080:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea/gitea:1.16.8-rootless
</span><span>$ docker exec --user 1000 gitea gitea admin user create --admin --username root --password admin1234 --email root@example.com
</span></code></pre>
<p>The <code>git</code> command can then be replaced with a script that waits forever:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>$ ( echo -e &#39;#!/bin/bash\nsleep infinity&#39; ) | docker exec -i --user root gitea tee /usr/bin/git
</span><span>$ docker exec --user root gitea chmod +x /usr/bin/git
</span></code></pre>
<p>Trying to create a repository from the web interface will create the conditions for a zombie to show:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>$ docker exec gitea ps -o ppid,pid,comm,args
</span><span>PPID PID COMMAND COMMAND
</span><span> 0 1 gitea /usr/local/bin/gitea -c /etc/gitea/app.ini web
</span><span> 1 94 sleep [sleep]
</span><span> 1 99 sleep [sleep]
</span><span> 1 111 sleep [sleep]
</span><span> 1 164 git {git} /bin/bash /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true init --bare
</span><span> 164 165 sleep sleep infinity
</span></code></pre>
<p>When the <code>git</code> process is killed by Gitea, the <code>sleep</code> child will be orphaned:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>$ docker exec gitea ps -o ppid,pid,comm,args
</span><span>PPID PID COMMAND COMMAND
</span><span> 0 1 gitea /usr/local/bin/gitea -c /etc/gitea/app.ini web
</span><span> 1 94 sleep [sleep]
</span><span> 1 99 sleep [sleep]
</span><span> 1 111 sleep [sleep]
</span><span> 1 165 sleep sleep infinity
</span></code></pre>
<p>Killing it will turn it into a zombie:</p>
<pre style="background-color:#2b303b;color:#c0c5ce;"><code><span>$ docker exec gitea kill 165
</span><span>$ docker exec gitea ps -o ppid,pid,comm,args
</span><span>PPID PID COMMAND COMMAND
</span><span> 0 1 gitea /usr/local/bin/gitea -c /etc/gitea/app.ini web
</span><span> 1 94 sleep [sleep]
</span><span> 1 99 sleep [sleep]
</span><span> 1 111 sleep [sleep]
</span><span> 1 165 sleep [sleep]
</span></code></pre>
<h3 id="killing-a-child-process-and-all-its-children">Killing a child process and all its children<a class="zola-anchor" href="#killing-a-child-process-and-all-its-children" aria-label="Anchor link for: killing-a-child-process-and-all-its-children"
><span class="anchor-icon">#</span></a
>
</h3>
<p>There should be no need for an admin running Gitea to worry about those gory details, it should be taken care of regardless of the environment Gitea runs in. Fortunately there is a very simple way to avoid the creation of zombies by ensuring that all Gitea child process are <a href="https://en.wikipedia.org/wiki/Process_group">process group leaders</a>. In a nutshell it means that when the child is killed all its children and grand children are also killed.</p>
</div>
<br>
<br>
<div class="blog__post-tag-container">
<a class="blog__post-tag" href="/tags/gna">#gna</a>
<a class="blog__post-tag" href="/tags/gitea">#gitea</a>
<a class="blog__post-tag" href="/tags/troubleshoot">#troubleshoot</a>
<a class="blog__post-tag" href="/tags/problem">#problem</a>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

309
coc/index.html Normal file
View File

@ -0,0 +1,309 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Code of Conduct | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Code of Conduct" />
<meta property="og:title" content="Code of Conduct | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="Code of Conduct" />
<meta
property="og:site_name"
content="Code of Conduct | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">Code of Conduct</h1>
<div class="page__group-content">
<h3 id="the-gna-collective-strives-to">The Gna! collective strives to:<a class="zola-anchor" href="#the-gna-collective-strives-to" aria-label="Anchor link for: the-gna-collective-strives-to"
><span class="anchor-icon">#</span></a
>
</h3>
<ul>
<li><strong>Be friendly, patient and welcoming.</strong> We strive to be a collective that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to, members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion and mental and physical ability.</li>
<li><strong>Be considerate.</strong> Our work will be used by other people, and we in turn will depend on the work of others. Any decision we take will affect users and colleagues, and we should take those consequences into account when making decisions. Remember that we're a world-wide community and we have a global base of users and of contributors. Even if it's not obvious at the time, our contributions to projects managed by the Gna! collective will impact the work of others.</li>
<li><strong>Be respectful.</strong> Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. Its important to remember that a collective where people feel uncomfortable or threatened is not a productive one. Members of the collective should be respectful when dealing with other contributors as well as with people outside of the collective and with users of the projects managed by Gna!.</li>
<li><strong>Collaborate openly.</strong> Collaboration is central to projects managed by Gna! and to the larger free software community. This collaboration involves individuals working within teams, cross-project collaboration within Gna! and working with other projects outside of Gna!. This collaboration reduces redundancy, and improves the quality of our work. Internally and externally, we should always be open to collaboration. Wherever possible, we should work closely with upstream and downstream projects and others in the free software community to coordinate our technical, advocacy, documentation and other work. Our work must be done transparently and we should involve as many interested parties as early as possible. If we decide to take a different approach than others, we will let them know early, document our work and inform others regularly of our progress. We do not create private forms of communication that take away transparency or exclude other contributors and collaborators.</li>
<li><strong>When we disagree, try to understand why.</strong> Disagreements, both social and technical, happen all the time and Gna! is no exception. It is important that we resolve disagreements and differing views constructively. Remember that were different. The strength of Gna! comes from people with a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesnt mean that theyre wrong.</li>
<li><strong>Focus on helping to resolve issues and learning from mistakes.</strong> It is important that we resolve disagreements and differing views constructively and with the help of the collective. When our goals differ dramatically, we encourage the creation of alternative implementations, so that the collective can test new ideas and contribute to the discussion.</li>
<li><strong>When we are unsure, we ask for help.</strong> Nobody knows everything, and nobody is expected to be perfect in Gna!. Asking questions avoids many problems down the road, and so questions are encouraged. Those who are asked questions should be responsive and helpful. However, when asking a question, care must be taken to do so in an appropriate forum.</li>
</ul>
<h3 id="we-take-the-following-very-seriously-and-any-violations-may-impact-your-ability-to-participate-in-gna">We take the following very seriously, and any violations may impact your ability to participate in Gna!<a class="zola-anchor" href="#we-take-the-following-very-seriously-and-any-violations-may-impact-your-ability-to-participate-in-gna" aria-label="Anchor link for: we-take-the-following-very-seriously-and-any-violations-may-impact-your-ability-to-participate-in-gna"
><span class="anchor-icon">#</span></a
>
</h3>
<ul>
<li><strong>Be careful with your words and actions.</strong> Do not insult or put down other participants. Harassment and other exclusionary behavior is not acceptable and should be reported. This includes but is not limited to:
<ul>
<li>Violent threats or language directed against another person.</li>
<li>Discriminatory jokes and language.</li>
<li>Posting sexually suggestive, explicit or violent material.</li>
<li>Posting (or threatening to post) other people's personally identifying information (&quot;doxing&quot;).</li>
<li>Personal insults, especially those using racist or sexist terms.</li>
<li>Unwelcome sexual attention.</li>
<li>Advocating for, or encouraging, any of the above behavior.</li>
<li>Repeated harassment of others. In general, if someone asks you to stop, then stop.</li>
</ul>
</li>
<li><strong>Respect the decision process.</strong> Members of Gna! should not attempt to manipulate decisons based on consensus or election results. Open debate is welcome, but vote trading, ballot stuffing and other forms of abuse are not acceptable.</li>
</ul>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

View File

@ -1,25 +0,0 @@
# The URL the site will be built for
base_url = "https://gna.org"
# Whether to automatically compile all Sass files in the sass directory
compile_sass = true
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = true
taxonomies = [
{name = "tags", feed = true}, # each tag will have its own feed
{name = "categories", paginate_by = 5}, # 5 items per page for a term
]
[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true
[extra]
# Put all your custom variables here
authors = [
{ "nick"="dachary", name="Loïc Dachary", "website"="https://dachary.org" },
{ "nick"="realaravinth", name="Aravinth Manivannan", "website"="https://batsense.net" }
]

View File

@ -1,3 +0,0 @@
+++
insert_anchor_links = "right"
+++

View File

@ -1,18 +0,0 @@
+++
title = "About"
description = "About"
+++
Gna! provides [dedicated managed Forgejo hosting](https://hosteadashboard.gna.org/dash/instance/new/), including [Woodpecker CI](https://woodpecker-ci.org/). Security updates are applied as soon as they are available and carefully tested. Each Forgejo instance is monitored 24/7 and has backups.
<video width="600" controls>
<source src="https://cloud.forgefriends.org/s/xXLcYpsE469tJEj/download?path=&files=hostea-screencast-vm-create.mp4" type="video/mp4" />
</video>
You can rely on Gna! if you are an individual software developer who need their own Forgejo instance with CI but can't be bothered with installation and maintenance. You want the freedom to download a backup and seamlessly self-host it whenever you decide: no strings attached.
If you are into trouble and need assistance with a Forgejo instance not hosted at Gna!, you [can ask for help at the Gna! clinic](/forgejo-clinic/). The doctors have developped a unique expertise and are well equiped to help you recover and upgrade.
---
Do you already have an expertise running Forgejo? You are welcome to join the [Gna! collective](https://forum.gna.org/t/57), get in touch [in the forum](https://forum.gna.org/c/site-feedback/2) or [the chat](https://matrix.to/#/#hostea:matrix.batsense.net).

View File

@ -1,59 +0,0 @@
+++
title = "[solved] blank or error 500 page after login"
date = 2022-05-08
description = "After going to production, some Gitea users saw a blank page after login and had to manually type the URL of the project they wanted to see in the browser."
[taxonomies]
tags = ['gna', 'gitea', 'upgrade', 'troubleshoot', 'problem']
[extra]
author = 'dachary'
+++
The [instructions to upgrade a Gitea instance](https://docs.gitea.io/en-us/upgrade-from-gitea/#upgrade-from-binary) only require three to four steps. They work fine most of the time but the documentation is lacking a "Troubleshooting" section to help out when something goes wrong. Maintaining instructions on how to diagnose and fix upgrade problems is an ambitious undertaking and requires updates every time a new case is discovered.
An [inventory of the known upgrade issues](https://forum.gna.org/t/things-to-know-about-gitea-upgrades/39) was started to figure out how to structure such a section in the documentation. The [release notes](https://blog.gitea.io/) were analyzed all the way back to [Gitea 1.9.6](https://github.com/go-gitea/gitea/releases/tag/v1.9.6) and the work is still in progress. Here is a sample of the tips that will be included:
* Upgrade directly to the latest Gitea version, there is no need to upgrade to intermediate versions.
* If the upgrade from version x.y to version x.y+2 fails and there is a need to narrow down the problem, try upgrading to the latest minor version of each major version and verify it works.
* etc.
However, even with the best documentation, someone will eventually **run into an new problem** and fixing it without compromising the integrity of the data will be challenging. This is best demonstrated by a real world example that was concluded a few days ago.
# Getting help from the community
After [upgrading a Gitea intsance from 1.9.6 to 1.16.5](https://discourse.gitea.io/t/blank-page-after-login/5051) the tests conducted manually did not uncover any problem. However, after going to production, some users saw a blank page after login and had to manually type the URL of the project they wanted to see in the browser. The person in charge of the upgrade never had to diagnose Gitea problem and [reached out in the Gitea forum](https://discourse.gitea.io/t/blank-page-after-login/5051).
> **Tip: explain the problem in a public forum as early as possible to get help from the community**
In their post in the forum they explained how they attempted to diagnose the problem and how why they thought that only users created a few years ago were impacted. It was a detailed analysis that was concluded with a partial copy of the logs. It was unfortunately missing [key information](https://discourse.gitea.io/t/blank-page-after-login/5051/12) that was provided only three days later. In the meantime, as they could not figure out the source of the problem, they were on the **verge of [accepting the loss of all the Gitea database](https://discourse.gitea.io/t/blank-page-after-login/5051/11) and start over from the repositories**. However, once all the details were available, [a workaround](https://discourse.gitea.io/t/blank-page-after-login/5051/13) was suggested in the forum.
> **Tip: focus more on providing detailed facts than exposing the attempted diagnostic**
There was hope to fix Gitea and in the following days they applied the workaround. They also tried to improve it but without success and eventually accepted a **partial data loss** as inevitable and [reported their success back to the forum](https://discourse.gitea.io/t/blank-page-after-login/5051/14).
> **Tip: when getting support from the community, providing feedback is the best token of appreciation**
# Getting professional help
The [Gna! Clinic](https://gna.org/gitea-clinic/) is a collective of individual and companies that provides professional services to Gitea admins. They are active members of the Gitea community who [help out](https://discourse.gitea.io/u/dachary/activity) as volunteers. They can also be hired to resolve the more complicated cases.
The Gitea instance that was in trouble required more than a few minutes of work and access to the database content for a proper diagnostic. They [proposed their assistance](https://discourse.gitea.io/t/blank-page-after-login/5051/13) but although [well received](https://discourse.gitea.io/t/user-research-about-gitea-upgrade-experiences-call-for-volunteers/5063/2), it was not accepted.
When the Gitea admin explained how they chose to resolve the problem [on the forum](https://discourse.gitea.io/t/blank-page-after-login/5051/14), it confirmed the workaround was viable and the root problem was identified. That was enough to figure out a fix for the underlying bug with [a rather simple patch](https://discourse.gitea.io/t/blank-page-after-login/5051/17) that was merged [and backported](https://github.com/go-gitea/gitea/pull/19629) in the following days. But it happened too late to avoid the data loss.
To summarize with a timeline, here is what happened:
* J+1: The **problem is discovered** by users who see a blank page after login and a the Gitea admin tries to diagnose the problem
* J+2: A message is sent **to ask for help in the community**
* J+2 to J+6: Three people in the community suggest ideas but **the Gitea admin cannot figure out the root cause and is on the verge of accepting the loss of all Gitea data** and restart from the git repositories
* J+6: A **workaround is suggested by the community**
* J+7 to J+17: The Gitea admin applies the **workaround and only looses part of the Gitea data**
And in retrospect, here is what could have happened instead:
* J+1: The **problem is discovered** by users who see a blank page after login
* J+1: The Gitea admin **[reaches out to someone at the Gna! Clinic](https://gna.org/gitea-clinic/)**
* J+2: The [logs of the Gitea instance](https://discourse.gitea.io/t/blank-page-after-login/5051/12) are analyzed, **the root cause diagnosed** and [a patch](https://discourse.gitea.io/t/blank-page-after-login/5051/17) is created to fix it.
* J+3: If necessary a Gitea binary is created with the patch and used as a temporary replacement until the next point release is published with [the backport](https://github.com/go-gitea/gitea/pull/19629). The Gitea admin runs the patched Gitea binary in the meantime. **There is no data loss**.
It does not mean all upgrade problems can be resolved so easily. But it shows, with an example, that in some cases it makes sense to get professional help.

View File

@ -1,44 +0,0 @@
+++
title = "[solved] Gitea 1.16.[678] error: fatal: unsafe repository is owned by someone else"
date = 2022-05-15
description = "If Gitea runs as user git, calls a patched Git version and a parent directory of the git repositories is owned by a user other than git, it will fail."
[taxonomies]
tags = ['gna', 'gitea', 'upgrade', 'troubleshoot', 'problem']
[extra]
author = 'dachary'
+++
April 12, 2022 version [git v2.35.2](https://lore.kernel.org/git/xmqqv8veb5i6.fsf@gitster.g/) was released and addresses a security issue [CVE-2022-24765](https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2). It was backported to 2.30.3, v2.31.2, v2.32.1, v2.33.2, and v2.34.2 and published by distributions such as [Debian GNU/Linux](https://security-tracker.debian.org/tracker/CVE-2022-24765), [Alpine](https://www.alpinelinux.org/releases/).
**If Gitea runs as user `foo`, calls a patched Git version and a parent directory of the git repositories is owned by a user other than `foo`, it will fail** with a message such as:
```
Failed to open repository: Git/Data Error: exit status 128 - fatal: unsafe repository ('/data/git/repositories/git/data.git' is owned by someone else)
```
This started to show in the past few weeks to [users running the Gitea binary on Windows](https://github.com/go-gitea/gitea/issues/19455) who also independently installed git v2.36. And then to people running [Gitea from snap](https://github.com/go-gitea/gitea/issues/19455#issuecomment-1106331149), on [a Synology NAS](https://github.com/go-gitea/gitea/issues/19455#issuecomment-1106312061) and then people running from [Gitea docker images](https://github.com/go-gitea/gitea/blob/main/Dockerfile#L2) which is based on [Alpine](https://www.alpinelinux.org/releases/).
### Workarounds
* If using [Gitea docker images](https://hub.docker.com/r/gitea/gitea):
* upgrade to [Gitea >=1.16.9](https://github.com/go-gitea/gitea/pull/19876) or 1.17, both have git >=2.36
* `git config --global --replace-all safe.directory '*'`
* If the Gitea binary was installed independently of git, upgrade git to a version that is [greater or equal to 2.36](https://git-scm.com/docs/git-config#Documentation/git-config.txt-safedirectory) and disable the security check entirely with:
* impersonate the [user dedicated to Gitea](https://docs.gitea.io/en-us/install-from-binary/#recommended-server-configuration) (usually git)
* `git config --global --replace-all safe.directory '*'`
### Bug fix
The [bug fix](https://github.com/go-gitea/gitea/pull/19870) is for Gitea to ensure `git config --global --replace-all safe.directory '*'` is set on its [dedicated user](https://docs.gitea.io/en-us/install-from-binary/#recommended-server-configuration) when it initializes. It is effective on the condition that the git CLI version is [greater or equal to 2.36](https://git-scm.com/docs/git-config#Documentation/git-config.txt-safedirectory).
### Bug fix rationale
It is safe to [disable the security check in Gitea](https://lab.forgefriends.org/forgefriends/forgefriends/-/merge_requests/50/diffs). It is not vulnerable to **[CVE-2022-24765](https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2)** because it calls the git CLI [after changing its working directory](https://github.com/go-gitea/gitea/blob/main/modules/git/command.go#L160) to be the git repository targeted by the command (for instance [diff](https://github.com/go-gitea/gitea/blob/main/modules/git/diff.go#L38-L45)) or a temporary directory. Therefore **it will not explore the parent directories looking for a git configuration file**.
The security check is triggered because the repository is owned by an unexpected user (root instead of git typically) and **not because a parent directory is owned by an unexpected user**. This, in itself, is a problem worth investigating but it is unrelated and was revealed by the newer security check of git even though it does not match the threat described in **[CVE-2022-24765](https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2)**.
It appears non trivial to enforce a consistent ownership of files and directories, either within docker or outside docker when networked file systems are involved. The Gitea server was not troubled by this inconsistency so far because the permissions allow it to write and read where expected, regardless of the owner. It is not worth looking into but it is ancient and unrelated.
Gitea runs under a dedicated user, either when installed [from binary](https://docs.gitea.io/en-us/install-from-binary/#recommended-server-configuration) or from [docker](https://docs.gitea.io/en-us/install-with-docker/) and [modifies the global git configuration](https://github.com/go-gitea/gitea/blob/main/modules/git/git.go#L196-L207) depending on the git version at initialization time. Fixing the problem can therefore be done by [disabling the security check in the global git config file at initialization time](https://lab.forgefriends.org/forgefriends/forgefriends/-/merge_requests/50/diffs#bcd72ff867cbd1ddd5b6518c3a05b5f1a6021286_209_209). It also requires a minimum version of git 2.36 to be installed, which is the case for Gitea docker images with [versions >= 1.16.9](https://github.com/go-gitea/gitea/pull/19876).

View File

@ -1,42 +0,0 @@
+++
title = "[solved] Gitea 1.15 and up: path not found or permission denied"
date = 2022-05-28
description = "After migrating from 1.15 or earlier to gitea 1.16 paths are no longer found and files cannot be created because of permission problems because the default example.ini file changed."
[taxonomies]
tags = ['gna', 'gitea', 'upgrade', 'troubleshoot', 'problem']
[extra]
author = 'dachary'
+++
In Gitea 1.15 the [app.example.ini](https://github.com/go-gitea/gitea/blob/cfb4c23a5009b9c236d48ac0bc156577c7d70741/custom/conf/app.example.ini) file was changed to [comment out most of the values](https://github.com/go-gitea/gitea/commit/4a84022d2559ccfc99960c7c654ee8b9b38664f7). The assumption was that all values exactly matched the defaults [in the source code](https://github.com/go-gitea/gitea/blob/main/modules/setting/setting.go). However, there are differences, for instance for [APP_DATA_PATH](https://github.com/go-gitea/gitea/blob/cfb4c23a5009b9c236d48ac0bc156577c7d70741/modules/setting/setting.go#L771). Before Gitea 1.15, `app.example.ini` contained:
```
APP_DATA_PATH = data
```
and the path was relative to the **directory from which the Gitea server was running**. In Gitea 1.15 up to 1.16, it was commented out:
```
; APP_DATA_PATH = data
```
and the path was relative to the **work path directory**, as provided either via the --work-path argument or the `GITEA_WORK_DIR` environment variable.
When a distribution such as voidlinux [uses app.example.ini](https://github.com/void-linux/void-packages/blob/master/srcpkgs/gitea/patches/config.patch) as a base for the Gitea package, this change indirectly creates a regression and an upgrade of Gitea [fails with errors](https://github.com/go-gitea/gitea/issues/19367) such as `unable to open level db at data/data/queues/common: mkdir data: permission denied`. The regression did not show as soon as Gitea 1.15 became available in voidlinux because the package [explicitly set `APP_DATA_PATH`](https://github.com/void-linux/void-packages/blob/7fc9190f0e0d557dd5031e68df4e183892d4315b/srcpkgs/gitea/patches/config.patch#L62). But this [changed when Gitea 1.15.6 was packaged](https://github.com/void-linux/void-packages/commit/19d986a2cae9ce73d32552ddb62443b5e7fa13e2) and once the value was commented out, upgrading triggered the problem. This was worked around six month later with the [Gitea 1.16.8](https://github.com/void-linux/void-packages/commit/44b6c96fa12ce9d993c7a2ac9486d892735b7e3a) package.
The `APP_DATA_PATH` directory is not the only one, the `[log] ROOT_PATH` is another example. There is an [ongoing effort](https://github.com/go-gitea/gitea/pull/19815) to improve the situation in Gitea 1.17. With the downside of introducing breaking changes that will have an impact on all Gitea installations because the content of the `app.ini` file will be interpreted differently. In the case of `APP_DATA_PATH`, both:
```
APP_DATA_PATH = data
```
and:
```
; APP_DATA_PATH = data
```
will be interpreted to be relative to the **work path directory**, as provided either via the --work-path argument or the `GITEA_WORK_DIR` environment variable. Every Gitea installation using **APP_DATA_PATH = data** will need to update the value to be an absolute path such as **/var/lib/gitea/data** so that it keeps pointing to the expected directory.
In order to prepare for the change or ensure the consistency of all path, there fortunately is a very simple **solution: always use absolute paths in the `app.ini` configuration file**.

View File

@ -1,81 +0,0 @@
+++
title = "[diagnostic] Zombies created by Gitea"
date = 2022-06-02
description = "An increasing number of zombies processes are created by Gitea because it only kills its direct children on timeout."
[taxonomies]
tags = ['gna', 'gitea', 'troubleshoot', 'problem']
[extra]
author = 'dachary'
+++
The first [issue about zombie processes](https://github.com/go-gitea/gitea/issues/3242) created by Gitea was reported in 2017 and [resurfaced](https://github.com/go-gitea/gitea/issues/13987) on a [regular basis](https://github.com/go-gitea/gitea/issues/19077). Although it does not look pretty, zombie processes are leftovers that do not consume resources and never caused any kind of harm. Here is one scenario that will create a zombie:
* Gitea updates a mirror by spawning the process `git remote update`
* `git remote update` spawns yet another process, `git fetch`
* `git fetch` is stuck, for instance because of network problems, and Gitea eventually times out
* Gitea kill the process `git remote update`
* When killed `git remote update` does not kill its own child and `git fetch` becomes an orphaned process which keeps running
* When `git fetch` eventually completes it becomes a zombie because its original parent is no longer around to wait on it
### PID 1 process and waiting on orphans
This scenario is not unique to Gitea and it is such a common pattern that safeguards have been implemented to mitigate the proliferation of zombies. Orphaned process are automatically attached to the process with PID 1, which is expected to wait on every process, whether it created them or not. When Gitea is installed from binary on GNU/Linux this is `/bin/init` and when Gitea runs from the [default docker image](https://github.com/go-gitea/gitea/blob/6171ea7d318c0ca8714bc6efd6a97ea4b495eb6d/Dockerfile) this is `s6`: they will both wait on orphaned processes and there won't be any zombies.
### What if Gitea is the only running process?
But when Gitea runs from the [rootless docker image](https://github.com/go-gitea/gitea/blob/6171ea7d318c0ca8714bc6efd6a97ea4b495eb6d/Dockerfile.rootless), Gitea is the only process running in the container. Orphaned processes will have Gitea as a parent but will not wait on them and they will stay in a zombie state forever. To reproduce this problem in a minimal way:
```
$ docker run --name gitea -p 8080:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea/gitea:1.16.8-rootless
$ docker exec --user 1000 gitea gitea admin user create --admin --username root --password admin1234 --email root@example.com
```
The `git` command can then be replaced with a script that waits forever:
```
$ ( echo -e '#!/bin/bash\nsleep infinity' ) | docker exec -i --user root gitea tee /usr/bin/git
$ docker exec --user root gitea chmod +x /usr/bin/git
```
Trying to create a repository from the web interface will create the conditions for a zombie to show:
```
$ docker exec gitea ps -o ppid,pid,comm,args
PPID PID COMMAND COMMAND
0 1 gitea /usr/local/bin/gitea -c /etc/gitea/app.ini web
1 94 sleep [sleep]
1 99 sleep [sleep]
1 111 sleep [sleep]
1 164 git {git} /bin/bash /usr/bin/git -c credential.helper= -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true init --bare
164 165 sleep sleep infinity
```
When the `git` process is killed by Gitea, the `sleep` child will be orphaned:
```
$ docker exec gitea ps -o ppid,pid,comm,args
PPID PID COMMAND COMMAND
0 1 gitea /usr/local/bin/gitea -c /etc/gitea/app.ini web
1 94 sleep [sleep]
1 99 sleep [sleep]
1 111 sleep [sleep]
1 165 sleep sleep infinity
```
Killing it will turn it into a zombie:
```
$ docker exec gitea kill 165
$ docker exec gitea ps -o ppid,pid,comm,args
PPID PID COMMAND COMMAND
0 1 gitea /usr/local/bin/gitea -c /etc/gitea/app.ini web
1 94 sleep [sleep]
1 99 sleep [sleep]
1 111 sleep [sleep]
1 165 sleep [sleep]
```
### Killing a child process and all its children
There should be no need for an admin running Gitea to worry about those gory details, it should be taken care of regardless of the environment Gitea runs in. Fortunately there is a very simple way to avoid the creation of zombies by ensuring that all Gitea child process are [process group leaders](https://en.wikipedia.org/wiki/Process_group). In a nutshell it means that when the child is killed all its children and grand children are also killed.

View File

@ -1,66 +0,0 @@
+++
title = "[solved] Zombies created by Gitea"
date = 2022-06-04
description = "Gitea can use process groups to kill its children using a negative PID to never create zombies."
[taxonomies]
tags = ['gna', 'gitea', 'troubleshoot', 'problem']
[extra]
author = 'dachary'
+++
Gitea can [create zombies](/blog/zombies), for instance if a Git mirror takes too long. When updating a mirror, Gitea relies on the `git remote update` command which creates a child process, `git-remote-https`, to fetch data from the remote repository. Gitea has an internal timeout that will kill the child process (e.g. `git remote update`) when it takes too long but will not kill the grandchild. This grandchild will become an orphan and run forever or until its own timeout expires, which is about two minutes on git version 2.25.
```
$ time git clone https://4.4.4.4
Clonage dans '4.4.4.4'...
fatal: impossible d'accéder à 'https://4.4.4.4/': Failed to connect to 4.4.4.4 port 443: Connexion terminée par expiration du délai d'attente
real 2m9,753s
user 0m0,001s
sys 0m0,009s
```
As explained in the [diagnostic blog post regarding Gitea zombies](/blog/zombies/#killing-a-child-process-and-all-its-children) there fortunately is a very simple way to avoid this by making sure each Gitea child is a [process group leader](https://en.wikipedia.org/wiki/Process_group). That first step was [introduced in Gitea 1.17](https://github.com/go-gitea/gitea/pull/19865) and [backported to Gitea 1.16.9](https://github.com/go-gitea/gitea/pull/19865). The actual bug fix can now be implemented.
### Using negative process id to kill children
When Gitea timeout on a child, it relies on [os.Process.Kill](https://github.com/golang/go/blob/f8a53df314e4af8cd350eedb0dae77d4c4fc30d0/src/os/exec/exec.go#L650) which translates into a using the kill(2) system call to send a SIGKILL signal to unconditionally terminate it: `kill(pid, SIGKILL)`. Using a negative pid with `kill(-pid, SIGKILL)` will also terminate all processes created by Gitea's child, without Gitea knowing when or why they were created. From the kill(2) manual page:
> If pid is less than -1, then sig is sent to every process in the process group whose ID is -pid.
Which is implemented as follows in the [Friendly Forge Format library](https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec.go#L130):
> `syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)`
### Not using the default Go CommandContext
Since [CommandContext](https://pkg.go.dev/os/exec#CommandContext) does not allow to send a signal to the negative pid of the child process, it has to be implemented by Gitea itself, in a way that is similar to how the [Friendly Forge Format library](https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec.go#L75-82) does it:
```
ctxErr := watchCtx(ctx, cmd.Process.Pid)
err = cmd.Wait()
interruptErr := <-ctxErr
// If cmd.Wait returned an error, prefer that.
// Otherwise, report any error from the interrupt goroutine.
if interruptErr != nil && err == nil {
err = interruptErr
}
```
### Testing the bug is fixed and stays fixed
Long standing bugs that are difficult to reproduce manually such as this one require robust testing to ensure that:
* the diagnostic identifying the root cause is correct
* the bug fix works
* it does not resurface insidiously because of a subtle regression introduce years later
It is easy to implement as can be seen in the [Friendly Forge Format library](https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L44-76). In a nutshell:
* [git clone https://4.4.4.4](https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L53) which will hang because of firewall rules
* [wait for the git-remote-https](https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L60-65) grandchild process to be spawned
* [cancel the context and wait for the goroutine to terminate](https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L67-68)
* [verify the git-remote-https is killed](https://lab.forgefriends.org/friendlyforgeformat/gofff/-/blob/a9603c7cc934fccd4382b7f4309b75c852742480/util/exec_test.go#L70-75)
And with that... no more zombies!

View File

@ -1,151 +0,0 @@
+++
title = "[tutorial] A gentle introduction to the gitea doctor"
date = 2022-06-14
description = "The doctor command is useful to check the health of a running Gitea instance. Specially after performing an upgrade."
[taxonomies]
tags = ['gna', 'gitea', 'troubleshoot', 'problem', 'tutorial']
[extra]
author = 'dachary'
+++
While helping people with their upgrades [in the Gitea forum](https://discourse.gitea.io/t/migration-from-1-2-to-1-16-8/5309) or [at the Gna! clinic](https://forum.gna.org/t/gitea-upgrade-from-1-14-1-to-1-16-8/90), I realized that few Gitea admins know about the [`gitea doctor`](https://docs.gitea.io/en-us/command-line/#doctor) command and decided to write this blog post as a gentle introduction.
### An apple a day keeps the doctor away
Or in our case, Gitea versions [below 1.11.5](https://github.com/go-gitea/gitea/blob/v1.11.5/cmd/doctor.go). Since then, the `gitea doctor` is available and is designed to run against a specific Gitea version. It would not be a good idea to try to run the doctor from Gitea 1.16 to verify the sanity of a Gitea 1.2 instance: it will be confused by how the database is organized and a number of other details. Historical fun fact: the `gitea doctor` was backported to [Gitea 1.10.5](https://github.com/go-gitea/gitea/blob/v1.10.5/cmd/doctor.go) and [Gitea 1.10.6](https://github.com/go-gitea/gitea/blob/v1.10.6/cmd/doctor.go) and may be of help if you run this particular version and are facing the problem that motivated the backport.
With each version `gitea doctor` improves and gains new capabilities. For instance, in Gitea 1.17 it becomes aware of [orphaned pull requests](https://github.com/go-gitea/gitea/pull/19731) and is able to fix them. If such a problem exists in Gitea 1.16, it does not know about it.
### Calling the doctor
In the following, examples are based on a Gitea 1.16.8 instance you can run as follows:
```bash
$ docker run --name gitea -p 3000:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea/gitea:1.16.8-rootless
$ docker exec gitea gitea admin user create --admin --username root --password admin1234 --email root@example.com
$ docker exec gitea mkdir /var/lib/gitea/data/log
```
And then you can go to the [web interface](https://127.0.0.1:3000/) to create a `test` repository, with an initial `README.md` file. When this is done the doctor can be called as follows:
```bash
$ docker exec gitea gitea doctor --all
[1] Check paths and basic configuration
- [I] Configuration File Path: "/etc/gitea/app.ini"
- [I] Repository Root Path: "/var/lib/gitea/git/repositories"
- [I] Data Root Path: "/var/lib/gitea"
- [I] Custom File Root Path: "/var/lib/gitea/custom"
- [I] Work directory: "/var/lib/gitea"
- [I] Log Root Path: "/var/lib/gitea/data/log"
OK
[2] Check if there is garbage storage files
OK
[3] Check Database Version
OK
[4] Check consistency of database
OK
[5] Check if user with wrong type exist
OK
[6] Check if OpenSSH authorized_keys file is up-to-date
OK
[7] Check if SCRIPT_TYPE is available
- [I] ScriptType bash is on the current PATH at /bin/bash
OK
[8] Check if hook files are up-to-date and executable
OK
[9] Recalculate Stars number for all user
OK
[10] Check old archives
- [I] 0 old archives in repository need to be deleted
OK
[11] Enable push options
- [I] Checked 1 repositories, 0 need updates.
OK
[12] Check for incorrectly dumped repo_units (See #16961)
- [W] Found 0 broken repo_units
OK
[13] Recalculate merge bases
- [W] 0 PRs with incorrect mergebases of 0 PRs total in 1 repos
OK
[14] Check git-daemon-export-ok files
- [I] Checked 1 repositories, 0 need updates.
```
### What does the doctor know?
Although the `doctor` can be compared to [fsck(8)](https://en.wikipedia.org/wiki/Fsck), it does not know everything. It took decades for `fsck` to become the ultimate authority on finding problems on file systems and reliably fixing them without losing data. Nowadays, only a handful of people in the world are brave enough to manually attempt a file system recovery when `fsck` cannot recover from a data loss.
The first `doctor` version is two years old and Gitea admins are still routinely running SQL queries against the database or moving files around when trying to figure out why a Gitea instance is not behaving as it should. It is however worth checking if the doctor does not already have a solution by listing all it can do:
```bash
$ docker exec gitea gitea doctor --list
Default Name Title
* paths Check paths and basic configuration
storages Check if there is garbage storage files
* check-db-version Check Database Version
check-db-consistency Check consistency of database
* check-user-type Check if user with wrong type exist
* authorized-keys Check if OpenSSH authorized_keys file is up-to-date
script-type Check if SCRIPT_TYPE is available
hooks Check if hook files are up-to-date and executable
recalculate-stars-number Recalculate Stars number for all user
check-old-archives Check old archives
enable-push-options Enable push options
fix-broken-repo-units Check for incorrectly dumped repo_units (See #16961)
recalculate-merge-bases Recalculate merge bases
check-git-daemon-export-ok Check git-daemon-export-ok files
```
And then call the `check` that looks interesting:
```bash
$ docker exec gitea gitea doctor --run authorized-keys
[1] Check if OpenSSH authorized_keys file is up-to-date
OK
```
The challenge is to figure out which `check` does what and at the moment the best source of information is ... [the sources](https://github.com/go-gitea/gitea/tree/v1.16.8) themselves. The [doctor.go](https://github.com/go-gitea/gitea/blob/v1.16.8/cmd/doctor.go) command is the entry point and [the doctor directory](https://github.com/go-gitea/gitea/tree/v1.16.8/modules/doctor) contains the rest.
Some `checks` are straightforward to understand, even if you do not know Go, such as [the authorized-keys check](https://github.com/go-gitea/gitea/blob/v1.16.8/modules/doctor/authorizedkeys.go). Others are much more involved and your best chance is to [ask the Gitea chatroom](https://matrix.to/#/#gitea:matrix.org) for help.
### Is it going to hurt?
By default the doctor (very much like `fsck -N`) only performs non destructive checks and displays diagnostics, with an indication of how serious the problem is. In the example above, there only are lines with **[I]** (which indicates an information) and **[W]** which indicates a warning that can be ignored but may be worth looking into. Those two warnings are actually just informational and should be labelled as **[I]**, [which has been fixed](https://github.com/go-gitea/gitea/pull/19836) in a more recent version of the doctor.
Now let's do something bad: remove the permissions from a hook in our repository:
```bash
$ docker exec gitea chmod -x /var/lib/gitea/git/repositories/root/test.git/hooks/post-receive
```
Run the doctor with the `check` supposed to find that out:
```bash
$ docker exec gitea gitea doctor --run hooks
[1] Check if hook files are up-to-date and executable
- [W] old hook file /var/lib/gitea/git/repositories/root/test.git/hooks/post-receive is not executable
```
Ask it to fix this with the `--fix` flag:
```bash
$ docker exec gitea gitea doctor --run hooks --fix
[1] Check if hook files are up-to-date and executable
- [W] Regenerated hooks for root/test
- [W] old hook file /var/lib/gitea/git/repositories/root/test.git/hooks/post-receive is not executable
```
And run it one last time to check all is well:
```bash
$ docker exec gitea gitea doctor --run hooks
[1] Check if hook files are up-to-date and executable
OK
```
Even when the doctor is unable to fix a problem, it can help by showing extensive debug output which can be found, by default, in the `doctor.log` file in the directory from which it runs. Or it can be displayed on the standard output with `--log-file -`, which is most convenient when running in docker.
### Going further
If that was helpful to you, I would very much appreciate if you [send me a message on Mastodon](https://mastodon.online/@dachary). It will encourage me to write more blog posts to share what I learn about Gitea. Even better: you could [send a pull request](https://github.com/go-gitea/gitea/pulls) to improve the doctor and help it mature.

View File

@ -1,47 +0,0 @@
+++
title = "1.17 breaking changes episode 1: preserving a custom gitconfig"
date = 2022-06-22
description = "The location of the gitconfig file used by Gitea moved and custom modifications must be manually moved as well."
[taxonomies]
tags = ['gna', 'gitea', 'troubleshoot', 'problem', 'tutorial']
[extra]
author = 'dachary'
+++
Before version 1.17, when Gitea needed to change the [git configuration](https://git-scm.com/docs/git-config), it modified the `$HOME/.gitconfig` file. For instance it would [set core.quotePath to false](https://github.com/go-gitea/gitea/blob/release/v1.16/modules/git/git.go#L174-L177):
```ini
[core]
quotePath = false
```
When installing Gitea [from docker](https://docs.gitea.io/en-us/install-with-docker/) or [rootless](https://docs.gitea.io/en-us/install-with-docker-rootless/) or even [from binary](https://docs.gitea.io/en-us/install-from-binary/) this `$HOME/.gitconfig` file belongs to a user that is [dedicated to Gitea](https://docs.gitea.io/en-us/install-from-binary/#prepare-environment) and not used by anyone else.
However, if an Gitea installation was done differently and `$HOME/.gitconfig` has been customized because it is shared by a user or another application, there is a good chance that manual modifications were done such as:
```ini
[user]
name = Jane Doe
email = jane@doe.com
```
It is also possible that the file was modified manually by the Gitea admin for other reasons. In both there is a **potential for breakage when upgrading to Gitea >= 1.17 because the location of the file changed**. It must be moved manually to the new location as follows:
* Figure out the directory where `$HOME/.gitconfig` must be moved by [running the doctor](https://gna.org/blog/gentle-introduction-to-the-doctor/):
```shell
$ gitea --work-path /app/gitea -c /data/gitea/conf/app.ini doctor
[1] Check paths and basic configuration
- [I] Configuration File Path: "/data/gitea/conf/app.ini"
- [I] Repository Root Path: "/data/git/repositories"
- [I] Data Root Path: "/data/gitea"
- [I] Custom File Root Path: "/data/gitea"
- [I] Work directory: "/app/gitea"
- [I] Log Root Path: "/data/gitea/log"
OK
```
* Copy the `$HOME/.gitconfig` file to the **Repository Root Path** (which is `/data/git/repositories` in the example above).
The reason why this breaking change was introduced is to workaround [a rare problem](https://gna.org/blog/unsafe-repository-is-owned-by-someone-else/) impacting Gitea installations relying on networked volumes.

View File

@ -1,34 +0,0 @@
+++
title = "1.17 breaking changes episode 2: preserving a custom gitconfig"
date = 2022-07-20
description = "The location of the gitconfig file used by Gitea moved twice, here is a guide to sort out why and how to deal with it."
[taxonomies]
tags = ['gna', 'gitea', 'troubleshoot', 'problem', 'tutorial']
[extra]
author = 'dachary'
+++
On June 21st, 2022 1.17.0-rc1 was published and the location of the gitconfig file moved to a new location, [which required manual intervention](2022-06-23-1.17-breaking-episode-1). This change impacted a large number of Gitea installations because the docker image tag **latest** [was set to 1.17.0-rc1](https://mastodon.online/@hostea/108514134565401798) by accident. As a result, about 10,000 pulls per hour from the docker hub got the release candidate instead of the expected stable version.
Unfortunately moving the git home directory in 1.17.0-rc1 was implemented in way that created a security problem. The [fix that was merged in Gitea](https://github.com/go-gitea/gitea/pull/20114) to fix it requires moving the gitconfig file and was released July 19th, 2022 in 1.17.0-rc2.
This would have been a minor inconvenience if it only has an impact on adventurous people trying the release candidate in a test environment. But since all Gitea production installations based on the **latest** tag were inadvertently upgraded to 1.17.0-rc1, the admins who moved their custom .gitconfig will need to move it one more time when upgrading to 1.17.0-rc2.
In 1.17.0-rc2, a custom .gitconfig must be moved manually to the [new git home directory](https://docs.gitea.io/en-us/config-cheat-sheet/#git-git) as follows:
* Figure out the directory where `$HOME/.gitconfig` must be moved by [running the doctor](https://gna.org/blog/gentle-introduction-to-the-doctor/):
```shell
$ gitea --work-path /app/gitea -c /data/gitea/conf/app.ini doctor
[1] Check paths and basic configuration
- [I] Configuration File Path: "/data/gitea/conf/app.ini"
- [I] Repository Root Path: "/data/git/repositories"
- [I] Data Root Path: "/data/gitea"
- [I] Custom File Root Path: "/data/gitea"
- [I] Work directory: "/app/gitea"
- [I] Log Root Path: "/data/gitea/log"
OK
```
* Copy the `$HOME/.gitconfig` file to the **Data Root Path**/home (which is `/data/gitea/home` in the example above).

View File

@ -1,46 +0,0 @@
+++
title = "Get a Gitea instance with CI at Gna!"
date = 2022-07-10
description = "It is now possible to rent a Gitea instance by the month, with Woodpecker CI. A self-hostable hosting solution supported by a horizontal collective of individuals and organizations. 25% of the income is dedicated to help the Free Software projects it depends on such as Gitea, Enough, Django, etc."
[taxonomies]
tags = ['gna', 'gitea', 'federation', 'forgefriends']
[extra]
author = 'dachary'
+++
Hosting a Gitea instance on Gna! is now possible (but still experimental). It is meant to be a minimum viable product: anyone can [create a new dedicated Gitea instance](https://hosteadashboard.gna.org) within minutes and pay for it on a monthly basis with a credit card. It includes a dedicated CI based on [Woodpecker](https://woodpecker-ci.org/). The smallest instance costs 10€ per month (2GB RAM, 10GB disk, 1CPU) and will be a good fit for a freelance up to a team of five people but bigger instances are also available if more RAM, CPU or disk is required.
<video width="600" controls>
<source src="https://cloud.forgefriends.org/s/xXLcYpsE469tJEj/download?path=&files=hostea-screencast-vm-create.mp4" type="video/mp4" />
</video>
The service is 100% infrastructure as code, published as [Ansible playbooks within Enough](https://lab.enough.community/main/infrastructure/-/tree/9e18ebbf675c8a65d1585d20b4cf6295af6e52ed/playbooks/hosteadashboard). It can be self-hosted on bare metal (with [libvirt](https://libvirt.org/)) or in the cloud (with [OpenStack](https://www.openstack.org/)): follow the [quick start](https://enough-community.readthedocs.io/en/latest/introduction.html#quick-start), configure playbooks for [hostea](https://enough-community.readthedocs.io/en/latest/services/hostea.html) and [the dashboard](https://enough-community.readthedocs.io/en/latest/services/hosteadashboard.html).
The organization supporting Gna! is a [horizontal collective](https://forum.gna.org/c/governance-and-decisions/7) of individuals and organizations. The [revenue sharing model](https://forum.gna.org/t/decision-revenue-sharing-model/92) is set to dedicate 25% of the income (more than the profits) to help the Free Software projects Hostea depends on such as Gitea, Enough, Django etc.
### The origin
In February 2022 the project of running a dedicated Gitea hosting service was [proposed to the Gitea project](https://discourse.gitea.io/t/a-gitea-hosting-service-under-the-umbrella-of-the-gitea-project/4692) and other organizations and [plans were drafted](https://blog.dachary.org/2022/02/16/project-plans-for-a-hosted-gitea-online-service/). After a month of discussions it turned out to not be a [good match for any of them](https://blog.dachary.org/2022/03/11/the-inconclusive-story-of-four-failed-project-offers/).
It was suggested to create a new project from scratch instead of joining an existing organization. However, in order to be sustainable, a hosting service needs customers willing to pay for the service. And nobody had that kind of skill. It was therefore decided that to terminate the project: there is no point is creating a technical stack that's not going to be used by anyone.
### A technical stack with no users
The most common mistake technical people do when creating a new piece of software is to overlook the fact that they have absolutely no idea how to let their intended user base know about it. Maybe the reason it happens so often is because it is very difficult to resist the urge of creating something. Because that's what technical people love to do: create things, even when they have no clue if it can be used.
It took no longer than two weeks for the people involved in Gna! to decide to build the technical stack to run hostea instead of being reasonable and give up. It was just too tempting.
To keep the madness contained and enjoyable, it was decided to set a deadline to July 1st and to [define precise and realistic technical goals](https://gitea.gna.org/Hostea/july-mvp/issues). It turned out to be an enjoyable experience: everyone learned a lot in the process and the outcome is something that can be reproduced. Most MVPs are a brittle pile of hacks designed to last a few weeks and be thrown away. But since a primary goal of the project was to create something self-hostable, it had to implement that feature and therefore be reproducible.
### A horizontal collective with a revenue sharing model
Another goal of Gna! is to deploy federated forges, even at an experimental stage. Instead of creating a centralized organization to support Gna!, it was decided to create [horizontal collective](https://forum.gna.org/c/governance-and-decisions/7). It feels like a contradiction for a project committed to decentralization to be governed by a centralized organization.
The collective is composed of individuals and organizations but, unlike exclusively volunteer based Free Software projects, it is for profit. Customers rent Gitea instances by the month and the income is used to pay for expenses. There is however a difficulty: by nature a horizontal collective cannot be incorporated as it would create a level of hierarchy. The [revenue sharing model](https://forum.gna.org/t/decision-revenue-sharing-model/92) had to be set as an informal agreement between members where one of them receives the income and distributes it to the others, depending on their Gna! related expenses.
It also requires that 25% of the income (not the profits) is dedicated to help the Free Software projects that Gna! depends on such as Gitea, Enough, Django etc. It can be via a donation, by upstreaming a bug fix or any kind of work that is beneficial to the dependency.
### Dedicated to forge federation
In the spirit of dogfooding, the people who created the technical stack of Gna! will use it for themselves on a daily basis. Since the focus of the authors is on [forge federation](https://forgefriends.org/blog/2022/06/30/2022-06-state-forge-federation/), they will add federation support in Hostea. This will be their primary motivation to improve and maintain Hostea: it is the only hosting platform where this can happen.

View File

@ -1,38 +0,0 @@
+++
title = "[security] Gitea < 1.17.3 git option injection explained"
date = 2022-10-17
description = "Prior to Gitea 1.17.3 the web interface that displays the commit graph could be used to inject git options used by the Gitea server."
[taxonomies]
tags = ['gna', 'gitea', 'security', 'problem', 'upgrade', 'solution']
[extra]
author = 'dachary'
+++
[Gitea 1.17.3](https://pouet.chapril.org/@gna/109176306611564720) includes a [security patch](https://lab.forgefriends.org/forgefriends/forgefriends/-/commit/d98c5db58fdeded983bf5c0fe781fd7b77a1235f) that prevents the injection of arguments to the git command run by Gitea.
When displaying the commit graph [for the master branch](https://gitea.gna.org/Gna/organization/graph?branch=refs%2Fheads%2Fmaster), the URL contains the argument **refs%2Fheads%2Fmaster** that is passed to the `git` command with something like:
```shell
git log --graph refs/head/master
```
If, by accident or maliciously, the branch name starts with a dash, it would be mistaken to be a `git` argument instead of a branch name. For instance **-h** could be passed to the `git` command as:
```shell
git log --graph -h
```
In reality the `rev-list` command is called before `log` and in Gitea 1.17.2 the debug output will show something like:
```
2022/10/17 07:17:17 ...s/web/repo/commit.go:124:Graph() [W] [634d017d] GetCommitGraphsCount error for generate graph exclude prs: false branches: [-h] in 1:root/test, Will Ignore branches and try again. Underlying Error: exit status 129 - usage: git rev-list [<options>] <commit-id>... [-- <path>...]
...
```
In Gitea 1.17.3 when the same command is run, the option is discarded and the debug output shows something like:
```
2022/10/17 07:25:05 ...dules/git/command.go:166:Run() [E] [634d0351] git command is broken: /usr/bin/git -c protocol.version=2 -c uploadpack.allowfilter=true -c uploadpack.allowAnySHA1InWant=true -c credential.helper= rev-list --count, broken args: -h
2022/10/17 07:25:05 ...s/web/repo/commit.go:124:Graph() [W] [634d0351] GetCommitGraphsCount error for generate graph exclude prs: false branches: [-h] in 1:root/test, Will Ignore branches and try again. Underlying Error: git command is broken
```

View File

@ -1,43 +0,0 @@
+++
title = "[security] Gitea < 1.17.2 bypassing URL restrictions during migration explained"
date = 2022-10-24
description = "Prior to Gitea 1.17.2 a malicious Gitea server could be used to request local files using the migration web interface or the REST API."
[taxonomies]
tags = ['gna', 'gitea', 'security', 'problem', 'upgrade', 'solution']
[extra]
author = 'dachary'
+++
[Gitea 1.17.2](https://pouet.chapril.org/@gna/108953815492944898) includes a [security patch](https://lab.forgefriends.org/forgefriends/forgefriends/-/commit/e6b3be460840f1f982d5358198466e7d6f509d21) that prevents bypassing URL restrictions during the migration of a remote repository.
When using the web interface or the REST API to [import / migrate a repository](https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/upstream/routers/api/v1/repo/migrate.go#L209-212) that exists on another forge, the URL of the remote forge is [verified](https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/routers/api/v1/repo/migrate.go#L109) and rejected if not allowed. For instance if it starts with **file://**, contains **%0c** [and more](https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/services/migrations/migrate.go#L43).
The migration then starts by [asking for more information](https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/services/migrations/migrate.go#L185) about the software project to be migrated, using this verified URL. The structure that is returned is supposed to contain an exact copy of the URL from which the migration must be done. But there is no guarantee that it does and some of the drivers implemented in Gitea may return a different URL.
For instance, when migrating a project from another Gitea instance, the Gitea migration driver [calls the GetRepo](https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/services/migrations/gitea_downloader.go#L153) function of the Gitea SDK, which returns the result of the [/repos/{owner}/{repo}](https://try.gitea.io/api/swagger#/repository/repoGet) endpoint verbatim.
If a malicious server is setup by an adversary so that the **/repos/{owner}/{repo}** enpoint returns a URL designed to leak information from the server such as **file:///etc/group**, it should also be verified and discarded. This is the purpose of the [check that was added](https://lab.forgefriends.org/forgefriends/forgefriends/-/blob/9fb251fb6fa2bb857bb8f5ae27f06c9d597bc1eb/services/migrations/migrate.go#L201-220) in Gitea 1.17.2.
```go
// SECURITY: If the downloader is not a RepositoryRestorer then we need to recheck the CloneURL
if _, ok := downloader.(*RepositoryRestorer); !ok {
// Now the clone URL can be rewritten by the downloader so we must recheck
if err := IsMigrateURLAllowed(repo.CloneURL, doer); err != nil {
return err
}
// SECURITY: Ensure that we haven't been redirected from an external to a local filesystem
// Now we know all of these must parse
cloneAddrURL, _ := url.Parse(opts.CloneAddr)
cloneURL, _ := url.Parse(repo.CloneURL)
if cloneURL.Scheme == "file" || cloneURL.Scheme == "" {
if cloneAddrURL.Scheme != "file" && cloneAddrURL.Scheme != "" {
return fmt.Errorf("repo info has changed from external to local filesystem")
}
}
// We don't actually need to check the OriginalURL as it isn't used anywhere
}
```

View File

@ -1,39 +0,0 @@
+++
title = "Introducing Gna!"
date = "2022-04-22"
description = "Introducing Hostea, a project Loïc Dachary and Aravinth Manivannan are working on to create a 100% Free software development suite, complete with CI/CD, static pages and gists"
draft = false
[taxonomies]
tags = ['hostea', 'forgefriends']
[extra]
author = 'realaravinth'
+++
Introducing [Hostea](https://gna.org), a project [Loïc
Dachary](https://dachary.org) and [Aravinth
Manivannan](https://batsense.net) are working on to create a full Free
software development suite based on
[Gitea](https://gitea.io) for the forge, [Woodpecker
CI](https://woodpecker-ci.org) for CI/CD,
[Pages](https://github.com/realaravinth/pages) for static sites and
[GitPad](https://gitpad.org) for gists.
This talk introduces the projects goals and philosophy behind the
project.
Please see
[here](https://forum.forgefriends.org/t/forgefriends-monthly-update-april-22st-2022-5pm-6pm-utc-2/673)
to learn more about the event.
## Details
- **organised by:** [forgefriends.org](https://forgefriends.org)
- **date:** 2022<sup>th</sup> April, 2022
- **venue:** Online
## Resources
- [slides(ODP)](./slides/2022-04-22-forgefriends-introducing-hostea.odp)
- [slides(PDF)](./slides/2022-04-22-forgefriends-introducing-hostea.pdf)

View File

@ -1,8 +0,0 @@
+++
title = "Posts"
sort_by = "date"
template = "blog/index.html"
page_template = "blog/post.html"
generate_feed = true
insert_anchor_links = "right"
+++

View File

@ -1,27 +0,0 @@
+++
title = "Code of Conduct"
description = "Code of Conduct"
+++
### The Gna! collective strives to:
* **Be friendly, patient and welcoming.** We strive to be a collective that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to, members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion and mental and physical ability.
* **Be considerate.** Our work will be used by other people, and we in turn will depend on the work of others. Any decision we take will affect users and colleagues, and we should take those consequences into account when making decisions. Remember that we're a world-wide community and we have a global base of users and of contributors. Even if it's not obvious at the time, our contributions to projects managed by the Gna! collective will impact the work of others.
* **Be respectful.** Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. Its important to remember that a collective where people feel uncomfortable or threatened is not a productive one. Members of the collective should be respectful when dealing with other contributors as well as with people outside of the collective and with users of the projects managed by Gna!.
* **Collaborate openly.** Collaboration is central to projects managed by Gna! and to the larger free software community. This collaboration involves individuals working within teams, cross-project collaboration within Gna! and working with other projects outside of Gna!. This collaboration reduces redundancy, and improves the quality of our work. Internally and externally, we should always be open to collaboration. Wherever possible, we should work closely with upstream and downstream projects and others in the free software community to coordinate our technical, advocacy, documentation and other work. Our work must be done transparently and we should involve as many interested parties as early as possible. If we decide to take a different approach than others, we will let them know early, document our work and inform others regularly of our progress. We do not create private forms of communication that take away transparency or exclude other contributors and collaborators.
* **When we disagree, try to understand why.** Disagreements, both social and technical, happen all the time and Gna! is no exception. It is important that we resolve disagreements and differing views constructively. Remember that were different. The strength of Gna! comes from people with a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesnt mean that theyre wrong.
* **Focus on helping to resolve issues and learning from mistakes.** It is important that we resolve disagreements and differing views constructively and with the help of the collective. When our goals differ dramatically, we encourage the creation of alternative implementations, so that the collective can test new ideas and contribute to the discussion.
* **When we are unsure, we ask for help.** Nobody knows everything, and nobody is expected to be perfect in Gna!. Asking questions avoids many problems down the road, and so questions are encouraged. Those who are asked questions should be responsive and helpful. However, when asking a question, care must be taken to do so in an appropriate forum.
### We take the following very seriously, and any violations may impact your ability to participate in Gna!
* **Be careful with your words and actions.** Do not insult or put down other participants. Harassment and other exclusionary behavior is not acceptable and should be reported. This includes but is not limited to:
* Violent threats or language directed against another person.
* Discriminatory jokes and language.
* Posting sexually suggestive, explicit or violent material.
* Posting (or threatening to post) other people's personally identifying information ("doxing").
* Personal insults, especially those using racist or sexist terms.
* Unwelcome sexual attention.
* Advocating for, or encouraging, any of the above behavior.
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
* **Respect the decision process.** Members of Gna! should not attempt to manipulate decisons based on consensus or election results. Open debate is welcome, but vote trading, ballot stuffing and other forms of abuse are not acceptable.

View File

@ -1,20 +0,0 @@
+++
title = "Forgejo Clinic"
description = "Get help with your sick Forgejo instance"
+++
## How does it work?
You can get help from the community on the [Gna! forum](https://forum.gna.org/c/clinic/5) or the [Forgejo issue tracker](https://codeberg.org/forgejo/forgejo/): it is the best way to resolve simple issues. If you are in a hurry or the problem is serious you could:
1. Get in touch with the [doctor of your choice](#gna-doctors)
2. Upload your sick Forgejo
3. Once it is repaired download it back home (or decide it deserves a permanent residence at [Gna!](https://gna.org))
4. Pay the doctor
## How much does it cost?
All Gna! doctors charge a flat hourly rate for consultations held in public (sensitive information is never revealed, even if the consultation is held in public). Private consultations fees depend on the Gna! doctor.
## Gna! Doctors
{{ forgejo_clinic_doc_reviews() }}

View File

@ -1,30 +0,0 @@
---
title: "Legalese"
draft: false
---
## Copyright
The copyright of the software and content used to build the infrastructure is held by the individual contributors who implemented it, as found in the [git history](https://lab.enough.community/main/infrastructure/commits/master).
## Intellectual Property
[Did You Say “Intellectual Property”? It's a Seductive Mirage](https://www.gnu.org/philosophy/not-ipr.html)
## Disclaimer of Warranty
There is no warranty for the service, to the extent permitted by applicable law. Except when otherwise stated in writing the service is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
## Limitation of Liability
In no event unless required by applicable law or agreed to in writing will any member of the Gna! community, or any other party who modifies the service as permitted by Gna!, be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the service (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the service to operate with any other service), even if such member or other party has been advised of the possibility of such damages.
## Interpretation of the Warranty and Liability disclaimers
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the service.
## Hosting
The services and this web site, as well as all sub-domains, are exclusively maintained and used by the individuals composing the Gna!. They can be reached at contact@gna.org.
For details, see [the documentation](https://lab.enough.community/main/infrastructure/-/tree/master/docs).

View File

@ -1,65 +0,0 @@
---
title: "Privacy"
draft: false
---
## Who is we?
In the context of a horizontal community, the word **we** has a different meaning than within not-for-profit organizations or companies. **We** are the individuals who have access to the resources that would enable them to modify how it is implemented. For instance, someone with access to the configuration of the web server can change the log retention policy.
## What information do we collect?
We collect information from you when you register on our site and gather data when you participate in the community by reading, writing, and evaluating the content shared here.
When registering on Gna! sites, you may be asked to enter your name and e-mail address. You may, however, visit our sites without registering. Your e-mail address will be verified by an email containing a unique link. If that link is visited, we know that you control the e-mail address.
When registered and participating, we record the IP address that the post originated from. We also may retain server logs which include the IP address of every request to our server.
## What do we use your information for?
Any of the information we collect from you may be used in one of the following ways:
* To personalize your experience &mdash; your information helps us to better respond to your individual needs.
* To send periodic emails &mdash; The email address you provide may be used to send you information, notifications that you request about changes to topics or in response to your user name, respond to inquiries, and/or other requests or questions.
## How do we protect your information?
We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information.
## What is your data retention policy?
We will make a good faith effort to:
* Retain server logs containing the IP address of all requests to this server no more than 15 days.
* Retain the IP addresses associated with registered users and their posts no more than 15 days.
## What about my data?
Users of Hotea's services can ask contact@gna.org to:
* Delete their account on a service when it is not a feature available to the user (for instance Nextcloud)
* Retrieve data associated with their account on a service that does not already provide full access
## Do we use cookies?
Yes. Cookies are small files that a site or its service provider transfers to your computer's hard drive through your Web browser (if you allow). These cookies enable the sites to recognize your browser and, if you have a registered account, associate it with your registered account.
We use cookies to understand and save your preferences for future visits and compile aggregate data about site traffic and site interaction so that we can offer better site experiences and tools in the future. We do not contract with third-party service providers.
## Online payment provider
The online payment service provider used to pay for a dedicated forge instance [in the dashboard](https://hosteadashboard.gna.org/dash/instance/new/) is [Stripe](https://stripe.com/). It has a [cookie policy](https://stripe.com/legal/cookies-policy) and various user trackers that Gna! does not approve.
This service is incompatible with the Gna! Terms of Service. It is highly recommended to use a browser extension such as [uBlock origin](https://ublockorigin.com/) to block tracking from stripe and to carefully opt-out all non-essential cookies.
## Do we disclose any information to outside parties?
We do not sell, trade, or otherwise transfer to outside parties any information.
## Your Consent
By using our sites, you consent to our sites privacy policy.
## Changes to our Privacy Policy
If we decide to change our privacy policy, we will post those changes on this page.

View File

@ -1,7 +0,0 @@
---
title: "Service Work in Progress"
draft: false
---
Thank you for your interest in Gna!, we are a work-in-progress. [Come
say hi](/contact) and join the conversion! :)

View File

@ -1,52 +0,0 @@
---
title: "Terms of Service"
draft: false
---
## CHATONS Charter compliance
Gna! is committed to comply with the [CHATONS charter](https://framagit.org/chatons/CHATONS/-/blob/master/docs/charter-and-manifesto.md).
All applications and infrastructure software used in Gna! are published under a Free Software license.
## User content
Gna! has no copyright claim over content uploaded by its users.
Gna! hosts, via application software, content in private spaces that are not publicly accessible. Gna! system administrators are committed to not look into those private spaces, even when they have the technical ability to do so, to respect the users privacy.
## Support
Support requests should be filed as an issue in https://forgejo.gna.org/Hostea/support/issues.
## Publicly available content published on Forgejo instances
All publicly available software published on the dedicated Forgejo instances provided by Gna! must be published under a [Free Software license](https://www.gnu.org/licenses/license-list.html).
## Infrastructure
Gna! exclusively uses resources located in France, at the Graveline OVH datacenter (59820 Gravelines, Nord-Pas-de-Calais-Picardie, France) and at 12 bd Magenta, 75010 Paris, France. A copy of the backups is kept at Arndtstr 44, 10965 Berlin, Germany. It is created and maintained using [Enough](https://lab.enough.community/main/infrastructure).
## Security
Security updates are applied via [unattended upgrades](https://lab.enough.community/main/infrastructure/-/blob/master/playbooks/misc/upgrades-playbook.yml).
## Backups
Backups are managed [via the Enough backup playbook](https://lab.enough.community/main/infrastructure/-/tree/master/playbooks/backup) so that there exist at least one backup of each machine in a geographical location that is different from the one where it runs.
Disaster recovery involves rebooting the machine that was lost using a backup, either within a libvirt hypervisor or an OpenStack tenant.
## GDPR compliance
A user can request deletion or anonymisation of the data they are unable to delete themselves by sending a request to contact@gna.org.
A user can request an copy of the data held by Gna! that they are unable to download themselves by sending a request to contact@gna.org.
## Editorial responsibility
The person responsible for the editorial content published on Gna! is Loïc Dachary, 12 bd Magenta, 75010 Paris.
## Human contact
Gna! users are kindly invited to get in touch with contact@gna.org and organize a meeting in person to discuss the services provided.

View File

@ -1,52 +0,0 @@
## ------------- start dachary ---------
[[ doctors ]]
nick = "dachary"
name ="Loïc Dachary"
website = "https://forgejo.gna.org/dachary/hostea/issues"
picture = "/people/dachary.png"
[[ doctors.reviews ]]
name = "Chris H."
rating = 5
remarks = "https://discourse.gitea.io/t/blank-page-after-login/5051/14"
## ------------- end dachary ---------
## ------------- start realaravinth ---------
[[ doctors ]]
nick = "realaravinth"
name ="Aravinth Manivannan"
website = "https://forgejo.gna.org/realaravinth/hostea/issues"
picture = "/people/realaravinth.jpg"
[[ doctors.reviews ]]
name = "Lisa V"
rating = 5
remarks = "Timely response, very satisfied."
[[ doctors.reviews ]]
name = "Bob C"
rating = 5
remarks = "Nice"
## ------------- end realaravinth ---------
## ------------- start easter-eggs ---------
[[ doctors ]]
nick = "easter-eggs"
name ="Easter-eggs"
website = "https://forgejo.gna.org/easter-eggs/clinic/issues"
picture = "/people/easter-eggs.png"
[[ doctors.reviews ]]
name = "Ken G"
rating = 5
remarks = "Very reliable!"
## ------------- end easter-eggs ---------

1
defaults.css Normal file
View File

@ -0,0 +1 @@
*{padding:0;margin:0;font-family:"Segoe UI", Tahoma, Geneva, Verdana, sans-serif;font-family:"Segoe UI", Tahoma, Geneva, Verdana, sans-serif}a{text-decoration:none}a:hover,button:hover{cursor:pointer}a,a:visited{color:#0056b3}.base{min-height:100vh;display:flex;flex-direction:column;width:100%}.main__content-container{display:flex;flex-direction:column;min-height:100%;justify-content:space-between;flex:2}p,h1,h2,h3,h4,li,ol,ul{color:#333}main{width:100%}blockquote{border-left:0.3em solid rgba(55,55,55,0.4);margin-bottom:16px;padding:0 1em;color:#707070}blockquote p,blockquote h1,blockquote h2,blockquote h3,blockquote h4,blockquote li,blockquote ol,blockquote ul{color:inherit}

View File

@ -1,43 +0,0 @@
# Add new Gna! Doctor to Forgejo Clinic section:
1. Add the following template to
[`clinic-doctors.toml`](../data/clinic-doctors.toml) and fill in the
Doctor details:
```toml
## ------------- batman ---------
[[ doctors ]]
nick = "batman"
name ="Bruce Wayne"
website = "https://bat.example.com"
## ------------- start batman ---------
```
2. Optionally, add Doctor's photo:
i. Add photo to [`../static/people`](../static/people)
ii. Add photo filename to Doctor's section created in step 1:
```toml
## ------------- batman ---------
[[ doctors ]]
nick = "batman"
name ="Bruce Wayne"
# <-----ADD BELOW LINE TO ADD PHOTO ---->
photo = "static/people/batman.jpg"
# <--------->
website = "https://bat.example.com"
## ------------- start batman ---------
```
## Style Guide
Please start and end doctor details with the following delimiters:
```toml
## ------------- start doctor-nick-name ---------
## ------------- start doctor-nick-name ---------
```

View File

@ -1,33 +0,0 @@
# Add ratings to Gna! Doctor
1. To rate Doctor `batman` from
[./forgejo-clinic-new-doctor.md](./forgejo-clinic-new-doctor.md) guide,
add the following section to `batman` section:
```toml
[[ doctors.reviews ]]
name = "Joker Hahaha"
rating = 0
remarks = "Hahaha"
```
**Note: Only add reviews between doctor-specific section delimited by
comment format mentioned in style guide**
The end result must look like the following:
```toml
## ------------- batman ---------
[[ doctors ]]
nick = "batman"
name ="Bruce Wayne"
photo = "static/people/batman.jpg"
website = "https://bat.example.com"
[[ doctors.reviews ]]
name = "Joker Hahaha"
rating = 0
remarks = "Hahaha"
## ------------- start batman ---------
```

View File

@ -1,37 +0,0 @@
# Add new blog post
1. Create new file at `/content/blog/yyyy-mm-dd-blog-post-title.md` and
populate with the following metadata:
```toml
+++
title = "title of your blog post"
date = "yyyy-mm-dd"
description = "description of your blog post, will be displayed in blog listing"
[taxonomies]
tags = ['tags', 'docs', 'rant']
[extra]
# **Only use author nicks in blog post Markdown files, it is used to lookup author details.**
author = 'imbatman' # author nickname
+++
```
2. Add author details in [`config.toml`](../config.toml) in `authors`
under `extra` section:
```toml
[extra]
# Put all your custom variables here
authors = [
{ "nick"="imbatman", name="Batman", "website"="https://batman.example.org" },
{ "nick"="superman", name="Superman", "website" ="https://superman.example.org" }
]
```
This information is used to render author information in blog posts.
**Only use author nicks in blog post Markdown files, it is used to
lookup author details.**
3. Add content to your blog post file, save and commit! 🎉

View File

@ -1,65 +0,0 @@
# Add new blog post
1. Create new directory at
`/content/talks/yyyy-mm-dd-talk-title-event-name` and `index.md` in
the same directory and populate with the following metadata:
```toml
+++
title = "title of the talk"
date = "yyyy-mm-dd"
description = "description of talk, will be displayed in talk listing"
[taxonomies]
tags = ['gna']
[extra]
# **Only use author nicks in blog post Markdown files, it is used to lookup author details.**
author = 'imbatman' # speaker nickname
+++
```
2. Add author details in [`config.toml`](../config.toml) in `authors`
under `extra` section:
```toml
[extra]
# Put all your custom variables here
authors = [
{ "nick"="imbatman", name="Batman", "website"="https://batman.example.org" },
{ "nick"="superman", name="Superman", "website" ="https://superman.example.org" }
]
```
This information is used to render speaker and author information in
talks and blog posts respectively. **Only use author nicks in talks post
Markdown files, it is used to lookup author details.**
3. Add content to about the talk to the file created in step 1.
4. Add talk-related resources like slides and related material in the
directory created in step 1. They will be accessible via relative
URLs. For instance:
```bash
➜ website git:(master) ✗ tree content/talks/22-04-2022-hostea-introducing-hostea-forgefriends-monthly-meet
content/talks/22-04-2022-hostea-introducing-hostea-forgefriends-monthly-meet
├── index.md
└── slides
├── 2022-04-22-forgefriends-introducing-hostea.odp
└── 2022-04-22-forgefriends-introducing-hostea.pdf
1 directory, 3 files
```
```markdown
## Resources
- [slides(ODP)](./slides/2022-04-22-forgefriends-introducing-hostea.odp)
- [slides(PDF)](./slides/2022-04-22-forgefriends-introducing-hostea.pdf)
```
**WARNING: Don't storing large images or videos in Git repositories,
using content hosting services and link to them**
5. Commit and push to deploy talk details! 🎉

10
elasticlunr.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

1
footer/main.css Normal file
View File

@ -0,0 +1 @@
footer{display:block;color:#333;font-size:0.7rem;padding:0;margin:0}.footer__container{width:100%;padding:0;justify-content:space-between;margin:auto;display:flex;flex-direction:row;overflow:hidden}.footer__column{list-style:none;display:flex;margin:auto 50px;align-items:center;flex:2.5}.footer__column--center{list-style:none;display:flex;margin:auto 50px;align-items:center;flex:2.5;margin:auto;flex-direction:column;align-items:center;flex:2}.footer__column:last-child{justify-content:flex-end}.footer__column:last-child a{margin:10px}.footer__link-container{margin:5px}.footer__link{text-decoration:none}.license__link{display:inline}.license__link:hover{color:#0056b3;text-decoration:underline}.footer__column-divider,.footer__column-divider--mobile-visible,.footer__column-divider--mobile-only{font-weight:500;opacity:0.7;margin:0 5px}.footer__column-divider--mobile-only{display:none}.footer__icon{margin:auto 5px;height:20px}

1
footer/mobile.css Normal file
View File

@ -0,0 +1 @@
footer{font-size:.44rem}.footer__container{display:grid;grid-template-rows:repeat(3, 100%);align-items:center;margin:auto;justify-content:center}.footer__link{font-size:0.5rem}.license__conatiner,.license__link{text-align:center}.footer__column:first-child{grid-row-start:3;flex-direction:row}.footer__column:last-child{grid-row-start:2}.footer__column{margin:0 auto;display:flex;padding:0;align-self:flex-end}.footer__column--center{margin:0 auto;display:flex;padding:0;align-self:flex-start}.footer__column-divider--mobile-only{margin:0 3px;font-size:9.9px}

389
forgejo-clinic/index.html Normal file
View File

@ -0,0 +1,389 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Forgejo Clinic | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Get help with your sick Forgejo instance" />
<meta property="og:title" content="Forgejo Clinic | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="Get help with your sick Forgejo instance" />
<meta
property="og:site_name"
content="Forgejo Clinic | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="page__container">
<h1 class="page__group-title">Forgejo Clinic</h1>
<div class="page__group-content">
<h2 id="how-does-it-work">How does it work?<a class="zola-anchor" href="#how-does-it-work" aria-label="Anchor link for: how-does-it-work"
><span class="anchor-icon">#</span></a
>
</h2>
<p>You can get help from the community on the <a href="https://forum.gna.org/c/clinic/5">Gna! forum</a> or the <a href="https://codeberg.org/forgejo/forgejo/">Forgejo issue tracker</a>: it is the best way to resolve simple issues. If you are in a hurry or the problem is serious you could:</p>
<ol>
<li>Get in touch with the <a href="https://gna.org/forgejo-clinic/#gna-doctors">doctor of your choice</a></li>
<li>Upload your sick Forgejo</li>
<li>Once it is repaired download it back home (or decide it deserves a permanent residence at <a href="https://gna.org">Gna!</a>)</li>
<li>Pay the doctor</li>
</ol>
<h2 id="how-much-does-it-cost">How much does it cost?<a class="zola-anchor" href="#how-much-does-it-cost" aria-label="Anchor link for: how-much-does-it-cost"
><span class="anchor-icon">#</span></a
>
</h2>
<p>All Gna! doctors charge a flat hourly rate for consultations held in public (sensitive information is never revealed, even if the consultation is held in public). Private consultations fees depend on the Gna! doctor.</p>
<h2 id="gna-doctors">Gna! Doctors<a class="zola-anchor" href="#gna-doctors" aria-label="Anchor link for: gna-doctors"
><span class="anchor-icon">#</span></a
>
</h2>
<div class="clinic__doctors-container">
<div class="doctor__container">
<img src="https://gna.org/people/realaravinth.jpg?h=f63faac10c0b6539c6bf16b59573e5eab39bc7a81fd15d1195f06294f24991c6" alt="" class="doctor__profile_photo">
<h3 class="doctor__name">Aravinth Manivannan</h3>
<div class="docutr__rating-container">
<p class="doctor_rating-stars">★★★★☆</p>
<!--<p class="doctor_rating-value">5</p> -->
</div>
<a href='https:&#x2F;&#x2F;forgejo.gna.org&#x2F;realaravinth&#x2F;hostea&#x2F;issues' class="doctor__contact">Get in touch</a>
</div>
<div class="doctor__container">
<img src="https://gna.org/people/easter-eggs.png?h=f82746c0d96a2eaff6a6ada551d8779bdc7edba190b71411cf178ca6f853bf27" alt="" class="doctor__profile_photo">
<h3 class="doctor__name">Easter-eggs</h3>
<div class="docutr__rating-container">
<p class="doctor_rating-stars">★★★★★</p>
<!--<p class="doctor_rating-value">5</p> -->
</div>
<a href='https:&#x2F;&#x2F;forgejo.gna.org&#x2F;easter-eggs&#x2F;clinic&#x2F;issues' class="doctor__contact">Get in touch</a>
</div>
<div class="doctor__container">
<img src="https://gna.org/people/dachary.png?h=5b8c493d6f287eb071e6c17109496c7bb9ce357330bf8ce49e7d4021b073ae15" alt="" class="doctor__profile_photo">
<h3 class="doctor__name">Loïc Dachary</h3>
<div class="docutr__rating-container">
<p class="doctor_rating-stars">★★★★★</p>
<!--<p class="doctor_rating-value">5</p> -->
</div>
<a href='https:&#x2F;&#x2F;forgejo.gna.org&#x2F;dachary&#x2F;hostea&#x2F;issues' class="doctor__contact">Get in touch</a>
</div>
</div>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

1
forgejo-clinic/main.css Normal file
View File

@ -0,0 +1 @@
.clinic__doctors-container{display:flex}.doctor__profile_photo{width:100px;height:100px;border-radius:100px}.doctor__container{background-color:#eee;margin:10px 30px;padding:10px;height:250px;border-radius:5px;width:30%;display:flex;flex-direction:column;align-items:center;justify-content:space-around}.doctor__name{text-align:center;margin:0 auto !important}.doctor_rating-stars,.doctor_rating-value{margin:0 auto !important;text-align:center}

View File

@ -0,0 +1 @@
.clinic__doctors-container{display:flex;flex-direction:column;align-items:center}.doctor__container{width:80%}

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

1
home/card-main.css Normal file
View File

@ -0,0 +1 @@
.home-card__group{display:flex;margin:0px auto;width:80%}.home-card__conatiner{background-color:#eee;margin:10px 30px;padding:10px;border-radius:5px;width:30%}.home-card__icon{width:100px;height:100px;margin:auto;border-radius:100px}.home-card__title{margin:auto;text-align:center}.home-card__text{font-size:0.7rem;text-align:center}

1
home/card-mobile.css Normal file
View File

@ -0,0 +1 @@
.home-card__group{flex-direction:column}.home-card__conatiner{margin:10px auto;width:80%}.home-card__group{margin:auto}

1
home/main.css Normal file
View File

@ -0,0 +1 @@
.home-card__group{display:flex;margin:0px auto;width:80%}.home-card__conatiner{background-color:#eee;margin:10px 30px;padding:10px;border-radius:5px;width:30%}.home-card__icon{width:100px;height:100px;margin:auto;border-radius:100px}.home-card__title{margin:auto;text-align:center}.home-card__text{font-size:0.7rem;text-align:center}.service__features{margin:20px 0px;height:100vh;min-height:500px;max-height:800px;display:flex;flex-direction:column;justify-content:space-between}.service__features--split{margin:20px 0px;height:100vh;min-height:500px;max-height:800px;display:flex;flex-direction:column;justify-content:space-between;max-height:1300px}.service-card__group{margin:0px auto}.service-card__conatiner{margin:10px 0px;border-radius:5px;display:flex;width:80%;margin:0 auto}.line-border{width:80%;display:block;border-bottom:1px solid #cacaca;margin:auto}.service-card__icon{width:100px;height:100px;margin:auto;flex:2;border-radius:100px}.service-card__service-name{color:green;font-weight:600}.service-card__title{margin:auto}.service-card__text{margin-bottom:30px !important}.service-card__text-container{flex:2;margin:auto !important}.service-card__aciton-btn{margin:auto 0;padding:10px;display:block;font-weight:400;border:none;background-color:#000}.service__features{display:flex;flex-direction:column;align-items:center}.service__features-title{margin:10px auto !important}.service-card__icon-container{width:30%;margin:auto}.service-card__aciton-btn--inactive{margin:auto;padding:10px;display:block;font-weight:400;border:none;background-color:lightgrey;color:#000}.home__vision-container{display:flex;align-items:center;height:200px;justify-content:space-between}.home__vision-text-line{font-size:0.8rem;font-style:italic}.home__vision-intro-title{text-align:center}.home__vision-intro-tagline{font-size:0.9rem;margin:auto;display:block;text-align:center}.home__vision-aciton-btn{display:block;font-weight:400;margin:20px auto;padding:15px;border:none;background-color:black;color:#fff}.home__vision-aciton-btn:hover{background-color:lightgray}.home__vision-action-link{color:white !important}.page__container--split{width:50%;margin:auto;padding:50px 0;width:80%;height:100vh;min-height:500px;max-height:800px;max-height:1300px;height:90vh !important;display:flex;flex-direction:column;justify-content:space-around}.index-banner__container{width:100%;display:flex;flex-direction:column;font-family:"Segoe UI", Tahoma, Geneva, Verdana, sans-serif;height:100vh;min-height:500px;max-height:800px;flex-grow:1}.index-banner{margin:auto;width:80%;display:flex;justify-content:space-between}.index-banner__logo-container{margin:center;align-items:center;display:flex;width:500px}.index-banner__title{margin:auto;font-style:none}.index-banner__tagline{margin:auto}.index-banner__title-container{display:flex}.index-banner__logo{margin:auto;border-radius:20px}.index-banner__main-action-btn{display:block;display:block;font-weight:400;padding:15px;border:none;margin:20px 0;background-color:green}.index-banner__main-action-link{color:white !important}.index-banner__features-list{margin:20px}.index-banner__features{margin:10px 0}.home__features{display:flex;flex-direction:column;align-items:center}.home__features-title{margin:auto}.index__group-content .page__container{width:80%;height:100vh;min-height:500px;max-height:800px;height:90vh !important;display:flex;flex-direction:column;justify-content:space-around}.action-call__container{background:#1f5818;width:100%;padding:60px 0}.action-call__margin-container{display:flex;width:80%;margin:auto;align-items:center;justify-content:space-around}.action-call__prompt{color:white;font-weight:400;font-size:1.7rem}.action-call__button{display:block;display:block;font-weight:400;padding:15px;border:none;margin:20px 0;background-color:#fff}.action-call__button:hover{background-color:lightgray}.action-call_link{color:#000 !important}.action-call_link:hover{text-decoration:none !important}

1
home/mobile.css Normal file
View File

@ -0,0 +1 @@
.home-card__group{flex-direction:column}.home-card__conatiner{margin:10px auto;width:80%}.home-card__group{margin:auto}.home__vision-container{flex-direction:column;height:auto !important;min-height:auto !important;max-height:auto !important}.service-card__conatiner{width:85%;flex-direction:column-reverse;margin:50px auto}.service__features--split,.service__features{height:auto !important;min-height:auto !important;max-height:none !important;flex-direction:column}.line-border{width:95%}.home__container{max-height:100vh;height:100vh}.home__name{font-size:2rem}.index-banner{margin:auto}.index-banner__title{font-size:2.5rem;margin:auto}.index__group-content .page__container{width:90%}.index-banner__logo-container{display:none}.action-call__margin-container{flex-direction:column;width:85%}.action-call__prompt{text-align:center}

View File

@ -0,0 +1 @@
.service__features{margin:20px 0px;height:100vh;min-height:500px;max-height:800px;display:flex;flex-direction:column;justify-content:space-between}.service__features--split{margin:20px 0px;height:100vh;min-height:500px;max-height:800px;display:flex;flex-direction:column;justify-content:space-between;max-height:1300px}.service-card__group{margin:0px auto}.service-card__conatiner{margin:10px 0px;border-radius:5px;display:flex;width:80%;margin:0 auto}.line-border{width:80%;display:block;border-bottom:1px solid #cacaca;margin:auto}.service-card__icon{width:100px;height:100px;margin:auto;flex:2;border-radius:100px}.service-card__service-name{color:green;font-weight:600}.service-card__title{margin:auto}.service-card__text{margin-bottom:30px !important}.service-card__text-container{flex:2;margin:auto !important}.service-card__aciton-btn{margin:auto 0;padding:10px;display:block;font-weight:400;border:none;background-color:#000}.service__features{display:flex;flex-direction:column;align-items:center}.service__features-title{margin:10px auto !important}.service-card__icon-container{width:30%;margin:auto}.service-card__aciton-btn--inactive{margin:auto;padding:10px;display:block;font-weight:400;border:none;background-color:lightgrey;color:#000}

View File

@ -0,0 +1 @@
.service-card__conatiner{width:85%;flex-direction:column-reverse;margin:50px auto}.service__features--split,.service__features{height:auto !important;min-height:auto !important;max-height:none !important;flex-direction:column}.line-border{width:95%}

1
home/vision-mobile.css Normal file
View File

@ -0,0 +1 @@
.home__vision-container{flex-direction:column;height:auto !important;min-height:auto !important;max-height:auto !important}

1
home/vision.css Normal file
View File

@ -0,0 +1 @@
.home__vision-container{display:flex;align-items:center;height:200px;justify-content:space-between}.home__vision-text-line{font-size:0.8rem;font-style:italic}.home__vision-intro-title{text-align:center}.home__vision-intro-tagline{font-size:0.9rem;margin:auto;display:block;text-align:center}.home__vision-aciton-btn{display:block;font-weight:400;margin:20px auto;padding:15px;border:none;background-color:black;color:#fff}.home__vision-aciton-btn:hover{background-color:lightgray}.home__vision-action-link{color:white !important}.page__container--split{width:50%;margin:auto;padding:50px 0;width:80%;height:100vh;min-height:500px;max-height:800px;max-height:1300px;height:90vh !important;display:flex;flex-direction:column;justify-content:space-around}

View File

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

View File

Before

Width:  |  Height:  |  Size: 473 B

After

Width:  |  Height:  |  Size: 473 B

View File

Before

Width:  |  Height:  |  Size: 497 B

After

Width:  |  Height:  |  Size: 497 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 330 B

After

Width:  |  Height:  |  Size: 330 B

304
index.html Normal file
View File

@ -0,0 +1,304 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="me" href="https://pouet.chapril.org/@gna" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://gna.org/main.css" />
<link
rel="stylesheet"
media="screen and (max-width: 1300px)"
href="https://gna.org/mobile.css"
/>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Home | Gna!: Managed Forgejo Hosting </title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Gna!: Dedicated managed Forgejo hosting, including CI&#x2F;CD
and static pages with upgrades, backups and 24&#x2F;7 monitoring" />
<meta property="og:title" content="Home | Gna!: Managed Forgejo Hosting " />
<meta property="og:type" content="article" />
<meta property="og:url" content="https:&#x2F;&#x2F;gna.org" />
<meta property="og:description" content="Gna!: Dedicated managed Forgejo hosting, including CI&#x2F;CD
and static pages with upgrades, backups and 24&#x2F;7 monitoring" />
<meta
property="og:site_name"
content="Home | Gna!: Managed Forgejo Hosting "
/>
<link
rel="apple-touch-icon"
sizes="57x57"
href="https://gna.org/apple-icon-57x57.png?h=c21de14cfdf862a6472ae977557fa048a7c36d39337e61d3274705e9bd8e857f"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="https://gna.org/apple-icon-60x60.png?h=67089d9025a52d0d1ddce450078c7acefe2c150a2427dec9f5e13c6314f74281"
/>
<link
rel="apple-touch-icon"
sizes="72x72"
href="https://gna.org/apple-icon-72x72.png?h=70725943de8884804f9da28202ced0ad6fed483ae9cf8f6d874aa133e30cb693"
/>
<link
rel="apple-touch-icon"
sizes="76x76"
href="https://gna.org/apple-icon-76x76.png?h=1e6e8072df3b21bdcea254a42aac6e993611e845f91ddd79f6f35a6c441710a5"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="https://gna.org/apple-icon-114x114.png?h=c20099f8190ed3962fab5726c5594857a871cdb3ee98439343c622cd3727fed6"
/>
<link
rel="apple-touch-icon"
sizes="120x120"
href="https://gna.org/apple-icon-120x120.png?h=4df78e402e60b58c6d44764678bdd737b5b6a836aeb85fb75fa49f706f7e8c81"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="https://gna.org/apple-icon-144x144.png?h=0c44e6655d714f89ee95cc151032d1f0dc3204bd24d1ca2ee9d94692d4ede84d"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="https://gna.org/apple-icon-152x152.png?h=157918f883ff95d4eeb6452d0ebb61ca5e21ea0dcac1aefe825f3e2f3999052f"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://gna.org/apple-icon-180x180.png?h=7d5c16d379b7db6d8ea5aae64921d7162b84f543763acd8fc7c107f80a600213"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="https://gna.org/android-icon-192x192.png?h=095e3835b082dba07f606c33fa6f71bcd671a71e987b0ab2e46dcddceef52b9c"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://gna.org/favicon-32x32.png?h=1bf54bf111572b1d1639192b5360ee4345f702e563aa71bb66610a95a7290437"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="https://gna.org/favicon-96x96.png?h=5a6ed96c09f5055526e3b236867a1272a26f7ba957d48b267bccd51ef0845fbe"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://gna.org/favicon-16x16.png?h=1e5fa59ae78516055f662e40bb2599dc3828a7adb34567e9d8d2cfcaa6b7aa5f"
/>
<link
rel="manifest"
href="https://gna.org/manifest.json?h=27eca3e8297eb7ff340deb3849b210185a459b3845456aa4d0036f6d966b3518"
/>
<meta name="msapplication-TileColor" content="#ffffff" />
<meta
name="msapplication-TileImage"
content="https://gna.org/ms-icon-144x144.png?h=8170ab51b871b84b8f98bd03cf441afdffb2998b7dfffb04abb7ebf5deeb1f94"
/>
<meta name="theme-color" content="#ffffff" />
</head>
</head>
<body class="base">
<header>
<nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" />
<div class="nav__header">
<a class="nav__logo-container" href="/">
<img src="https://gna.org/gna-logo-rectangle-48px.png?h=ba9eab043277265f94c51b87d5e14f9ca35789403ecb8afc9bd1e33b13c6a2a5" alt="Gna!"/>
</a>
<label class="nav__hamburger-menu" for="nav__toggle">
<span class="nav__hamburger-inner"></span>
</label>
</div>
<div class="nav__spacer--small"></div>
<div class="nav__link-group">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;about&#x2F;">About</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;blog&#x2F;">Blog</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;matrix.to&#x2F;#&#x2F;#gna:matrix.batsense.net">Chat</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="&#x2F;forgejo-clinic&#x2F;">Clinic</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;forum.gna.org">Forum</a>
</div>
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;pouet.chapril.org&#x2F;@gna">Mastodon</a>
</div>
</div>
<div class="nav__spacer"></div>
<div class="nav__link-group--small">
<div class="nav__link-container">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;login&#x2F;">Login</a>
</div>
<div class="nav__link-container--action">
<a class="nav__link" rel="noreferrer" href="https:&#x2F;&#x2F;hosteadashboard.gna.org&#x2F;register&#x2F;">Join</a>
</div>
</div>
</nav>
</header>
<!-- See ../sass/main.scss. Required for pushing footer to the very
bottom of the page -->
<div class="main__content-container">
<main>
<div class="index-banner__container">
<div class="index-banner">
<div class="index-banner__content-container">
<h1 class="index-banner__title">
<a href="https://forgejo.org">Forgejo</a> hosting and <a href="/forgejo-clinic/">service</a>.
</h1>
<p class="index-banner__tagline">A free forge ecosystem for free developers.</p>
<ul class="index-banner__features-list">
<li class="index-banner__features">Dedicated <a href="https://hosteadashboard.gna.org/register/">Forgejo hosting</a> and <a href="https://woodpecker-ci.org/">Woodpecker CI</a> from 10€/month</li>
<li class="index-banner__features">Clinic to <a href="/forgejo-clinic/">heal sick Forgejo</a> instances</li>
<li class="index-banner__features">100% <a href="https://www.gnu.org/philosophy/free-sw.html">Free Software</a></li>
<li class="index-banner__features">Radically <a href="https://forum.gna.org/t/55">Transparent</a></li>
<li class="index-banner__features">Run by a <a href="https://forum.gna.org/t/55">horizontal collective</a></li>
<li class="index-banner__features">25% of the income <a href="https://forum.gna.org/t/decision-revenue-sharing-model/92">dedicated to sustain Free Software dependencies</a></li>
<li class="index-banner__features">Committed to <a href="https://forgefriends.org/blog/2022/06/30/2022-06-state-forge-federation/">further forge federation</a></li>
</ul>
<button class="index-banner__main-action-btn">
<a href="https://hosteadashboard.gna.org" class="index-banner__main-action-link"
>Get Started</a
>
</button>
</div>
<div class="index-banner__logo-container">
<img
class="index-banner__logo"
src="https://gna.org/gna-logo-rectangle.png?h=8cf419ebcbe49e0ef2143f982f5afe1023fee0e1647f14798f3b1d5b991ad370"
alt="Gna! logo"
/>
</div>
</div>
</div>
</main>
<footer>
<div class="footer__container">
<!-- <div class="footer__column"> --->
<p class="footer__column license__conatiner">
All text <a
class="license__link"
rel="noreferrer"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank"
>&nbsp;CC-BY-SA&nbsp;</a
>
&amp; code
<a
class="license__link"
rel="noreferrer"
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
>&nbsp;AGPL&nbsp;</a
>
|
<a
class="license__link"
rel="noreferrer"
href="https://www.eff.org/issues/do-not-track/amp/"
target="_blank"
>&nbsp;No AMP&nbsp;</a
>
</p>
<!-- </div> -->
<div class="footer__column--center">
<a href="/blog/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="https://gna.org/icons/rss.svg?h=f6cd584bdbcd2eb4d1b8b84c9cf083ef45f772167c33fdcee754b35ae8ff4c7d"
class="footer__icon"
alt="Email icon"
/>
</a>
</div>
<div class="footer__column">
<a href="/about" title="About">About</a>
<a href="/coc" title="Code of Conduct">CoC</a>
<span class="footer__column-divider--mobile-only">|</span>
<a href="/legalese" title="Legalese">Legalese</a>
<a href="/privacy-policy" title="Privacy Policy">Privacy</a>
<span class="footer__column-divider--mobile-only">|</span>
<a
href="https://forgejo.gna.org/Gna"
rel="noreferrer"
target="_blank"
title="Status"
>Source Code</a
>
<a href="/tos" title="Terms of Service">ToS</a>
</div>
</div>
</footer>
</div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More