<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sokwe.janegoodall.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=StevanEarl</id>
	<title>sokwedb - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://sokwe.janegoodall.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=StevanEarl"/>
	<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/wiki/Special:Contributions/StevanEarl"/>
	<updated>2026-04-09T03:39:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.6</generator>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Installing_pg_isok&amp;diff=482</id>
		<title>Installing pg isok</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Installing_pg_isok&amp;diff=482"/>
		<updated>2025-12-15T19:48:46Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;pg_isok is &amp;quot;The Warning System&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== When to Install ==&lt;br /&gt;
&lt;br /&gt;
Pg_isok is installed in its own schema, isolated from all of SokweDB&amp;#039;s schemas.  It only need be installed once, upon database creation.  Removing or re-installing SokweDB&amp;#039;s schemas using the build tools do not interfere with the content of Pg_isok&amp;#039;s schema.&lt;br /&gt;
&lt;br /&gt;
Of course, if an entire database is dropped, re-created, and restored from backup, pg_isok will also need to be restored.  Depending on the situation, this may involve reinstalling pg_isok and then restoring the content of its tables.&lt;br /&gt;
&lt;br /&gt;
== Installing The Warning System (pg_isok) ==&lt;br /&gt;
&lt;br /&gt;
The [https://kop.codeberg.page/pg_isok_docs pg_isok] PostgreSQL extension is used as SokweDB&amp;#039;s &amp;quot;Warning System&amp;quot;.  Because SokweDB is in the cloud, pg_isok must be installed from a SQL script.&lt;br /&gt;
&lt;br /&gt;
To generate the SQL needed to install pg_isok, follow the cloud instructions found in the [https://kop.codeberg.page/pg_isok_docs pg_isok documentation].&lt;br /&gt;
SokweDB expects installation in a schema named &amp;lt;code&amp;gt;isok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Install pg_isok in each database.&lt;br /&gt;
&lt;br /&gt;
After installation, permissions must be granted. &lt;br /&gt;
&lt;br /&gt;
The following example shows the steps involved to install pg_isok version 0.1.4, using &amp;lt;code&amp;gt;psql&amp;lt;/code&amp;gt;, and to grant the expected permissions.  (The name of the SQL file, included with &amp;lt;code&amp;gt;\i&amp;lt;/code&amp;gt;, will vary with the pg_isok version and the relative location of the sql file.)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;&lt;br /&gt;
 SET ROLE TO admin;&lt;br /&gt;
 CREATE SCHEMA isok;&lt;br /&gt;
 GRANT USAGE ON SCHEMA isok TO reader;&lt;br /&gt;
 GRANT USAGE ON SCHEMA isok TO writer;&lt;br /&gt;
 &lt;br /&gt;
 \i ../pg_isok_cloud--0.1.4.sql&lt;br /&gt;
 &lt;br /&gt;
 -- IQ_TYPES&lt;br /&gt;
 GRANT SELECT ON isok.iq_types TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.iq_types TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- IR_TYPES&lt;br /&gt;
 GRANT SELECT ON isok.ir_types TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.ir_types TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- ISOK_QUERIES&lt;br /&gt;
 GRANT SELECT ON isok.isok_queries TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.isok_queries TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- ISOK_RESULTS&lt;br /&gt;
 GRANT SELECT ON isok.isok_results TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.isok_results TO writer;&lt;br /&gt;
 &lt;br /&gt;
 GRANT SELECT ON isok.isok_results_irid_seq TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_results_irid_seq TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_results_irid_seq TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- run_isok_queries()&lt;br /&gt;
 GRANT EXECUTE ON FUNCTION isok.run_isok_queries() TO writer;&lt;br /&gt;
 GRANT EXECUTE ON FUNCTION isok.run_isok_queries(TEXT) TO writer;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== updating pg_isok ==&lt;br /&gt;
&lt;br /&gt;
Installing or updating pg_isok requires a clean isok schema. As such, a backup of warn queries and results that can be reloaded after updating pg_isok is needed if that information should be maintained. The procedure for updating pg_isok is similar to those for installation with the additional steps of first creating a data-only dump of isok schema contents prior to dropping then creating the schema, and restoring those contents once the update is complete. As with installation, these steps need to be addressed separately for each database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pg_dump -h HOST -d DATABASE -n isok -Fc --data-only &amp;gt; isok_schema_contents&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
within psql:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DROP SCHEMA isok CASCADE;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the installation steps above to (re)install pg_isok then restore the dumped contents to repopulate the schema:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pg_restore -h HOST -d DATABASE -n isok --data-only isok_schema_contents&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=PostgreSQL_Administration&amp;diff=481</id>
		<title>PostgreSQL Administration</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=PostgreSQL_Administration&amp;diff=481"/>
		<updated>2025-12-15T19:38:36Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: now refer isok administration to the installing isok page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Killing long-running queries ==&lt;br /&gt;
&lt;br /&gt;
This section is about stopping, that is &amp;#039;&amp;#039;killing&amp;#039;&amp;#039;, queries that should not be running.&lt;br /&gt;
&lt;br /&gt;
Because users run SQL queries, they may inadvertently execute erroneous queries.&lt;br /&gt;
These queries usually run for excessive amounts of time and produce extremely large result sets.&lt;br /&gt;
&lt;br /&gt;
Because SokweDB runs in the cloud and cloud billing is usage-based, in addition to slowing down the system, these queries can cost money.&lt;br /&gt;
&lt;br /&gt;
=== Problem overview ===&lt;br /&gt;
&lt;br /&gt;
It is relatively easy to write such a query, if you&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT ...&lt;br /&gt;
   FROM tablea, tableb, tablec ...&amp;lt;/code&amp;gt;&lt;br /&gt;
and do not supply any &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;JOIN&amp;lt;/code&amp;gt; conditions,&lt;br /&gt;
the result will be the cross product of all rows of all tables.  In other words, each row of each table will be paired up with every row of every other table, producing A times B times C number of output rows, where A, B, and C are the number of rows in &amp;lt;code&amp;gt;tablea&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tableb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;tablec&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Some of the generic database interfaces may have ways to monitor the database backend to discover and kill such bad queries.&lt;br /&gt;
Alternately, use the [[#Finding a query to kill|manual process]] below.&lt;br /&gt;
&lt;br /&gt;
=== Permissions required ===&lt;br /&gt;
&lt;br /&gt;
No matter the user interface used, the permission requirements are the same:&lt;br /&gt;
Any user can kill their own queries.&lt;br /&gt;
Only [https://sokwe.janegoodall.org/doc/tech_spec/architecture/permissions/#the-administrator-permission-levels an administrator] can kill other user&amp;#039;s queries.&lt;br /&gt;
&lt;br /&gt;
=== Finding a query to kill ===&lt;br /&gt;
To kill such a query, first find it&amp;#039;s process number, it&amp;#039;s &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is found in the &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt; column of the following query:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT * FROM pg_stat_activity;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Killing the query ===&lt;br /&gt;
&lt;br /&gt;
The following statement kills the query, where &amp;lt;code&amp;gt;MYPID&amp;lt;/code&amp;gt; is the pid of the query to be killed:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT pg_terminate_backend(MYPID);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The query may not always immediately stop.&lt;br /&gt;
It is best to check that no mistake was made and the process was actually killed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing Isok, &amp;quot;The Warning System&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
SokweDB uses [https://kop.codeberg.page/pg_isok_docs Isok] to generate its warnings. Refer to the [[installing pg_isok|Installing_pg_isok]] page for instructions on installing and administering the pg_isok warning system.&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Installing_pg_isok&amp;diff=480</id>
		<title>Installing pg isok</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Installing_pg_isok&amp;diff=480"/>
		<updated>2025-12-15T19:33:07Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;pg_isok is &amp;quot;The Warning System&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== When to Install ==&lt;br /&gt;
&lt;br /&gt;
Pg_isok is installed in its own schema, isolated from all of SokweDB&amp;#039;s schemas.  It only need be installed once, upon database creation.  Removing or re-installing SokweDB&amp;#039;s schemas using the build tools do not interfere with the content of Pg_isok&amp;#039;s schema.&lt;br /&gt;
&lt;br /&gt;
Of course, if an entire database is dropped, re-created, and restored from backup, pg_isok will also need to be restored.  Depending on the situation, this may involve reinstalling pg_isok and then restoring the content of its tables.&lt;br /&gt;
&lt;br /&gt;
== Installing The Warning System (pg_isok) ==&lt;br /&gt;
&lt;br /&gt;
The [https://kop.codeberg.page/pg_isok_docs pg_isok] PostgreSQL extension is used as SokweDB&amp;#039;s &amp;quot;Warning System&amp;quot;.  Because SokweDB is in the cloud, pg_isok must be installed from a SQL script.&lt;br /&gt;
&lt;br /&gt;
To generate the SQL needed to install pg_isok, follow the cloud instructions found in the [https://kop.codeberg.page/pg_isok_docs pg_isok documentation].&lt;br /&gt;
SokweDB expects installation in a schema named &amp;lt;code&amp;gt;isok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Install pg_isok in each database.&lt;br /&gt;
&lt;br /&gt;
After installation, permissions must be granted. &lt;br /&gt;
&lt;br /&gt;
The following example shows the steps involved to install pg_isok version 0.1.4, using &amp;lt;code&amp;gt;psql&amp;lt;/code&amp;gt;, and to grant the expected permissions.  (The name of the SQL file, included with &amp;lt;code&amp;gt;\i&amp;lt;/code&amp;gt;, will vary with the pg_isok version and the relative location of the sql file.)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;&lt;br /&gt;
 SET ROLE TO admin;&lt;br /&gt;
 CREATE SCHEMA isok;&lt;br /&gt;
 GRANT USAGE ON SCHEMA isok TO reader;&lt;br /&gt;
 GRANT USAGE ON SCHEMA isok TO writer;&lt;br /&gt;
 &lt;br /&gt;
 \i ../pg_isok_cloud--0.1.4.sql&lt;br /&gt;
 &lt;br /&gt;
 -- IQ_TYPES&lt;br /&gt;
 GRANT SELECT ON isok.iq_types TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.iq_types TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- IR_TYPES&lt;br /&gt;
 GRANT SELECT ON isok.ir_types TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.ir_types TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- ISOK_QUERIES&lt;br /&gt;
 GRANT SELECT ON isok.isok_queries TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.isok_queries TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- ISOK_RESULTS&lt;br /&gt;
 GRANT SELECT ON isok.isok_results TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.isok_results TO writer;&lt;br /&gt;
 &lt;br /&gt;
 GRANT SELECT ON isok.isok_results_irid_seq TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_results_irid_seq TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_results_irid_seq TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- run_isok_queries()&lt;br /&gt;
 GRANT EXECUTE ON FUNCTION isok.run_isok_queries() TO writer;&lt;br /&gt;
 GRANT EXECUTE ON FUNCTION isok.run_isok_queries(TEXT) TO writer;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== updating pg_isok ==&lt;br /&gt;
&lt;br /&gt;
Installing or updating pg_isok requires a clean isok schema. As such, a backup of warn queries and results that can be reloaded after updating pg_isok is needed if that information should be maintained. The procedure for updating pg_isok is to installation with the additional steps of first creating a data-only dump of isok schema contents prior to dropping then creating the schema, and restoring those contents once the upgrade is complete. As with installation, these steps need to be addressed separately for each database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pg_dump -h HOST -d DATABASE -n isok -Fc --data-only &amp;gt; isok_schema_contents&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
within psql:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DROP SCHEMA isok CASCADE;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the installation steps above to (re)install pg_isok then restore the dumped contents to repopulate the schema:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pg_restore -h HOST -d DATABASE -n isok --data-only isok_schema_contents&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Installing_pg_isok&amp;diff=479</id>
		<title>Installing pg isok</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Installing_pg_isok&amp;diff=479"/>
		<updated>2025-12-15T19:03:42Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: added additional instructions for updating pg_isok&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;pg_isok is &amp;quot;The Warning System&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== When to Install ==&lt;br /&gt;
&lt;br /&gt;
Pg_isok is installed in its own schema, isolated from all of SokweDB&amp;#039;s schemas.  It only need be installed once, upon database creation.  Removing or re-installing SokweDB&amp;#039;s schemas using the build tools do not interfere with the content of Pg_isok&amp;#039;s schema.&lt;br /&gt;
&lt;br /&gt;
Of course, if an entire database is dropped, re-created, and restored from backup, pg_isok will also need to be restored.  Depending on the situation, this may involve reinstalling pg_isok and then restoring the content of its tables.&lt;br /&gt;
&lt;br /&gt;
== Installing The Warning System (pg_isok) ==&lt;br /&gt;
&lt;br /&gt;
The [https://kop.codeberg.page/pg_isok_docs pg_isok] PostgreSQL extension is used as SokweDB&amp;#039;s &amp;quot;Warning System&amp;quot;.  Because SokweDB is in the cloud, pg_isok must be installed from a SQL script.&lt;br /&gt;
&lt;br /&gt;
To generate the SQL needed to install pg_isok, follow the cloud instructions found in the [https://kop.codeberg.page/pg_isok_docs pg_isok documentation].&lt;br /&gt;
SokweDB expects installation in a schema named &amp;lt;code&amp;gt;isok&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Install pg_isok in each database.&lt;br /&gt;
&lt;br /&gt;
After installation, permissions must be granted. &lt;br /&gt;
&lt;br /&gt;
The following example shows the steps involved to install pg_isok version 0.1.4, using &amp;lt;code&amp;gt;psql&amp;lt;/code&amp;gt;, and to grant the expected permissions.  (The name of the SQL file, included with &amp;lt;code&amp;gt;\i&amp;lt;/code&amp;gt;, will vary with the pg_isok version and the relative location of the sql file.)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;&lt;br /&gt;
 SET ROLE TO admin;&lt;br /&gt;
 CREATE SCHEMA isok;&lt;br /&gt;
 GRANT USAGE ON SCHEMA isok TO reader;&lt;br /&gt;
 GRANT USAGE ON SCHEMA isok TO writer;&lt;br /&gt;
 &lt;br /&gt;
 \i ../pg_isok_cloud--0.1.4.sql&lt;br /&gt;
 &lt;br /&gt;
 -- IQ_TYPES&lt;br /&gt;
 GRANT SELECT ON isok.iq_types TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.iq_types TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.iq_types TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- IR_TYPES&lt;br /&gt;
 GRANT SELECT ON isok.ir_types TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.ir_types TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.ir_types TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- ISOK_QUERIES&lt;br /&gt;
 GRANT SELECT ON isok.isok_queries TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_queries TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.isok_queries TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- ISOK_RESULTS&lt;br /&gt;
 GRANT SELECT ON isok.isok_results TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT INSERT ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_results TO writer;&lt;br /&gt;
 GRANT DELETE ON isok.isok_results TO writer;&lt;br /&gt;
 &lt;br /&gt;
 GRANT SELECT ON isok.isok_results_irid_seq TO reader;&lt;br /&gt;
 GRANT SELECT ON isok.isok_results_irid_seq TO writer;&lt;br /&gt;
 GRANT UPDATE ON isok.isok_results_irid_seq TO writer;&lt;br /&gt;
 &lt;br /&gt;
 -- run_isok_queries()&lt;br /&gt;
 GRANT EXECUTE ON FUNCTION isok.run_isok_queries() TO writer;&lt;br /&gt;
 GRANT EXECUTE ON FUNCTION isok.run_isok_queries(TEXT) TO writer;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== updating pg_isok ==&lt;br /&gt;
&lt;br /&gt;
Installing or updating pg_isok requires a clean isok schema. As such, a backup of warn queries and results that can be reloaded after updating pg_isok is needed if that information should be maintained. The procedure for updating pg_isok is generally the same as for installation with the additional steps of first creating a data-only dump of isok schema contents prior to dropping then creating the schema, and restoring those contents once the upgrade is complete. As with installation, these steps need to be addressed separately for each database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pg_dump -h HOST -d DATABASE -n isok -Fc --data-only &amp;gt; isok_schema_contents&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;DROP SCHEMA isok CASCADE;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the installation steps above to (re)install pg_isok then restore the dumped contents to repopulate the schema:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pg_restore -h HOST -d DATABASE -n isok --data-only isok_schema_contents&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=PostgreSQL_Administration&amp;diff=476</id>
		<title>PostgreSQL Administration</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=PostgreSQL_Administration&amp;diff=476"/>
		<updated>2025-11-10T21:34:40Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Killing long-running queries ==&lt;br /&gt;
&lt;br /&gt;
This section is about stopping, that is &amp;#039;&amp;#039;killing&amp;#039;&amp;#039;, queries that should not be running.&lt;br /&gt;
&lt;br /&gt;
Because users run SQL queries, they may inadvertently execute erroneous queries.&lt;br /&gt;
These queries usually run for excessive amounts of time and produce extremely large result sets.&lt;br /&gt;
&lt;br /&gt;
Because SokweDB runs in the cloud and cloud billing is usage-based, in addition to slowing down the system, these queries can cost money.&lt;br /&gt;
&lt;br /&gt;
=== Problem overview ===&lt;br /&gt;
&lt;br /&gt;
It is relatively easy to write such a query, if you&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT ...&lt;br /&gt;
   FROM tablea, tableb, tablec ...&amp;lt;/code&amp;gt;&lt;br /&gt;
and do not supply any &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;JOIN&amp;lt;/code&amp;gt; conditions,&lt;br /&gt;
the result will be the cross product of all rows of all tables.  In other words, each row of each table will be paired up with every row of every other table, producing A times B times C number of output rows, where A, B, and C are the number of rows in &amp;lt;code&amp;gt;tablea&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tableb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;tablec&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Some of the generic database interfaces may have ways to monitor the database backend to discover and kill such bad queries.&lt;br /&gt;
Alternately, use the [[#Finding a query to kill|manual process]] below.&lt;br /&gt;
&lt;br /&gt;
=== Permissions required ===&lt;br /&gt;
&lt;br /&gt;
No matter the user interface used, the permission requirements are the same:&lt;br /&gt;
Any user can kill their own queries.&lt;br /&gt;
Only [https://sokwe.janegoodall.org/doc/tech_spec/architecture/permissions/#the-administrator-permission-levels an administrator] can kill other user&amp;#039;s queries.&lt;br /&gt;
&lt;br /&gt;
=== Finding a query to kill ===&lt;br /&gt;
To kill such a query, first find it&amp;#039;s process number, it&amp;#039;s &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is found in the &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt; column of the following query:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT * FROM pg_stat_activity;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Killing the query ===&lt;br /&gt;
&lt;br /&gt;
The following statement kills the query, where &amp;lt;code&amp;gt;MYPID&amp;lt;/code&amp;gt; is the pid of the query to be killed:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT pg_terminate_backend(MYPID);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The query may not always immediately stop.&lt;br /&gt;
It is best to check that no mistake was made and the process was actually killed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing Isok, &amp;quot;The Warning System&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
SokweDB uses [https://kop.codeberg.page/pg_isok_docs Isok] to generate its warnings.&lt;br /&gt;
Because SokweDB uses the Microsoft Azure cloud database service to run PostgreSQL, Isok cannot be installed as a PostgreSQL extension.  It must be installed as &amp;quot;pure SQL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Follow the [https://kop.codeberg.page/pg_isok_docs/pg_isok_html/html_paginated/Installation.html#SQL-Install SQL-based installation instructions] in the Isok documentation to build a SQL file for the current version of Isok.  Then execute the following code, using the &amp;lt;code&amp;gt;psql&amp;lt;/code&amp;gt; command line program, to install.  (Using &amp;lt;code&amp;gt;psql&amp;lt;/code&amp;gt;&amp;#039;s &amp;lt;code&amp;gt;\i&amp;lt;/code&amp;gt; feature, to execute the code from a file, is recommended.)&lt;br /&gt;
&lt;br /&gt;
The exact code to execute, based on the code below, depends on the generated SQL&amp;#039;s file name and path.  Don&amp;#039;t forget to adjust this before execution.&lt;br /&gt;
&lt;br /&gt;
If installing a newer version of Isok, note that this code deletes all the Isok table content, including queries and query results.  The content will need to be restored from a data-only dump of the Isok schema.&lt;br /&gt;
&lt;br /&gt;
  -- Update isok to the latest version (ish)&lt;br /&gt;
  -- Destroys all data in the schema!&lt;br /&gt;
  -- Must be run by an admin user.&lt;br /&gt;
  -- A psql input file&lt;br /&gt;
  &lt;br /&gt;
  set role admin;&lt;br /&gt;
  &lt;br /&gt;
  drop schema isok cascade;&lt;br /&gt;
  &lt;br /&gt;
  create schema isok;&lt;br /&gt;
  grant usage on schema isok to reader, writer;&lt;br /&gt;
  &lt;br /&gt;
  -- This is your Isok cloud installation file, generated by:&lt;br /&gt;
  -- make TARGET_SCHEMA=isok sql/pg_isok_cloud--1.2.0.sql&lt;br /&gt;
  -- https://kop.codeberg.page/pg_isok_docs/pg_isok_html/html_paginated/Installation.html&lt;br /&gt;
  \i isok/pg_isok_cloud--1.2.0.sql&lt;br /&gt;
  &lt;br /&gt;
  grant select on all tables in schema isok to reader;&lt;br /&gt;
  grant select on all sequences in schema isok to reader;&lt;br /&gt;
  &lt;br /&gt;
  grant select, insert, update, delete on all tables in schema isok to writer;&lt;br /&gt;
  grant select, update, usage on all sequences in schema isok to writer;&lt;br /&gt;
  &lt;br /&gt;
  grant execute on all functions in schema isok to reader, writer;&lt;br /&gt;
  &lt;br /&gt;
  grant truncate on all tables in schema isok to writer ;&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=PostgreSQL_Administration&amp;diff=475</id>
		<title>PostgreSQL Administration</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=PostgreSQL_Administration&amp;diff=475"/>
		<updated>2025-11-10T21:33:31Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: added grant truncate to isok schema&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Killing long-running queries ==&lt;br /&gt;
&lt;br /&gt;
This section is about stopping, that is &amp;#039;&amp;#039;killing&amp;#039;&amp;#039;, queries that should not be running.&lt;br /&gt;
&lt;br /&gt;
Because users run SQL queries, they may inadvertently execute erroneous queries.&lt;br /&gt;
These queries usually run for excessive amounts of time and produce extremely large result sets.&lt;br /&gt;
&lt;br /&gt;
Because SokweDB runs in the cloud and cloud billing is usage-based, in addition to slowing down the system, these queries can cost money.&lt;br /&gt;
&lt;br /&gt;
=== Problem overview ===&lt;br /&gt;
&lt;br /&gt;
It is relatively easy to write such a query, if you&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT ...&lt;br /&gt;
   FROM tablea, tableb, tablec ...&amp;lt;/code&amp;gt;&lt;br /&gt;
and do not supply any &amp;lt;code&amp;gt;WHERE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;JOIN&amp;lt;/code&amp;gt; conditions,&lt;br /&gt;
the result will be the cross product of all rows of all tables.  In other words, each row of each table will be paired up with every row of every other table, producing A times B times C number of output rows, where A, B, and C are the number of rows in &amp;lt;code&amp;gt;tablea&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tableb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;tablec&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Some of the generic database interfaces may have ways to monitor the database backend to discover and kill such bad queries.&lt;br /&gt;
Alternately, use the [[#Finding a query to kill|manual process]] below.&lt;br /&gt;
&lt;br /&gt;
=== Permissions required ===&lt;br /&gt;
&lt;br /&gt;
No matter the user interface used, the permission requirements are the same:&lt;br /&gt;
Any user can kill their own queries.&lt;br /&gt;
Only [https://sokwe.janegoodall.org/doc/tech_spec/architecture/permissions/#the-administrator-permission-levels an administrator] can kill other user&amp;#039;s queries.&lt;br /&gt;
&lt;br /&gt;
=== Finding a query to kill ===&lt;br /&gt;
To kill such a query, first find it&amp;#039;s process number, it&amp;#039;s &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is found in the &amp;lt;code&amp;gt;pid&amp;lt;/code&amp;gt; column of the following query:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT * FROM pg_stat_activity;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Killing the query ===&lt;br /&gt;
&lt;br /&gt;
The following statement kills the query, where &amp;lt;code&amp;gt;MYPID&amp;lt;/code&amp;gt; is the pid of the query to be killed:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;SELECT pg_terminate_backend(MYPID);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The query may not always immediately stop.&lt;br /&gt;
It is best to check that no mistake was made and the process was actually killed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing Isok, &amp;quot;The Warning System&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
SokweDB uses [https://kop.codeberg.page/pg_isok_docs Isok] to generate its warnings.&lt;br /&gt;
Because SokweDB uses the Microsoft Azure cloud database service to run PostgreSQL, Isok cannot be installed as a PostgreSQL extension.  It must be installed as &amp;quot;pure SQL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Follow the [https://kop.codeberg.page/pg_isok_docs/pg_isok_html/html_paginated/Installation.html#SQL-Install SQL-based installation instructions] in the Isok documentation to build a SQL file for the current version of Isok.  Then execute the following code, using the &amp;lt;code&amp;gt;psql&amp;lt;/code&amp;gt; command line program, to install.  (Using &amp;lt;code&amp;gt;psql&amp;lt;/code&amp;gt;&amp;#039;s &amp;lt;code&amp;gt;\i&amp;lt;/code&amp;gt; feature, to execute the code from a file, is recommended.)&lt;br /&gt;
&lt;br /&gt;
The exact code to execute, based on the code below, depends on the generated SQL&amp;#039;s file name and path.  Don&amp;#039;t forget to adjust this before execution.&lt;br /&gt;
&lt;br /&gt;
If installing a newer version of Isok, note that this code deletes all the Isok table content, including queries and query results.  The content will need to be restored from a data-only dump of the Isok schema.&lt;br /&gt;
&lt;br /&gt;
  -- Update isok to the latest version (ish)&lt;br /&gt;
  -- Destroys all data in the schema!&lt;br /&gt;
  -- Must be run by an admin user.&lt;br /&gt;
  -- A psql input file&lt;br /&gt;
  &lt;br /&gt;
  set role admin;&lt;br /&gt;
  &lt;br /&gt;
  drop schema isok cascade;&lt;br /&gt;
  &lt;br /&gt;
  create schema isok;&lt;br /&gt;
  grant usage on schema isok to reader, writer;&lt;br /&gt;
  &lt;br /&gt;
  -- This is your Isok cloud installation file, generated by:&lt;br /&gt;
  -- make TARGET_SCHEMA=isok sql/pg_isok_cloud--1.2.0.sql&lt;br /&gt;
  -- https://kop.codeberg.page/pg_isok_docs/pg_isok_html/html_paginated/Installation.html&lt;br /&gt;
  \i isok/pg_isok_cloud--1.2.0.sql&lt;br /&gt;
  &lt;br /&gt;
  grant select on all tables in schema isok to reader;&lt;br /&gt;
  grant select on all sequences in schema isok to reader;&lt;br /&gt;
  &lt;br /&gt;
  grant select, insert, update, delete on all tables in schema isok to writer;&lt;br /&gt;
  grant select, update, usage on all sequences in schema isok to writer;&lt;br /&gt;
  &lt;br /&gt;
  grant execute on all functions in schema isok to reader, writer;&lt;br /&gt;
&lt;br /&gt;
  grant truncate on all tables in schema isok to writer ;&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=VPN_Setup&amp;diff=336</id>
		<title>VPN Setup</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=VPN_Setup&amp;diff=336"/>
		<updated>2024-02-09T16:46:38Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: docs: add not about copying ssh with File Explorer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to setup a computer so that it runs the SokweDB VPN, allowing programs on the computer to connect directly to the SokweDB database.&lt;br /&gt;
&lt;br /&gt;
The estimated setup time is 15 minutes.  &lt;br /&gt;
Communication is involved so more than one sitting is required, increasing the total start-to-finish time beyond 15 minutes.&lt;br /&gt;
The setup time may vary widely, depending on whether you read the entire section on digital identity, how much time you spend talking with the SokweDB administrator, how testing goes, and whether you setup on multiple computers.&lt;br /&gt;
Time must also be spent on downloading, installing, configuring, and testing whatever database-aware programs you wish to have on your computer.&lt;br /&gt;
&lt;br /&gt;
Note that once you have created a digital identity you should [[#Using the VPN From Multiple Computers|re-use it]], on different computers, instead of creating multiple identities.&lt;br /&gt;
&lt;br /&gt;
== Navigating the Installation Process ==&lt;br /&gt;
&lt;br /&gt;
The [[#Initial VPN Setup|Initial VPN Setup]] section can be completed in one sitting, once the SokweDB administrator is in contact so you can get started and agree on a [[#Agree on a VPN Login Name|VPN login name]].&lt;br /&gt;
But testing and [[VPN#Using the VPN|VPN use]] will have to wait for the administrator to [[VPN User Management|setup]] the VPN&amp;#039;s server-side.&lt;br /&gt;
&lt;br /&gt;
The SokweDB VPN is constructed from the existing components of your computer&amp;#039;s Operating System.&lt;br /&gt;
This keep-it-simple approach means that there is no installation program, you will need to follow some instructions to get set-up.&lt;br /&gt;
These involve some cutting and pasting of entire blocks of command lines, the details of which you need not be concerned.&lt;br /&gt;
MS Windows users will also have to use the mouse to create a shortcut icon on the desktop.&lt;br /&gt;
Worst-case, someone else can take remote-control of your computer and set things up for you.&lt;br /&gt;
&lt;br /&gt;
When cutting and pasting, cut and paste entire blocks of text as presented in the document, not individual lines.&lt;br /&gt;
After pasting into a terminal window, the &amp;quot;Enter&amp;quot; key on the keyboard must be pressed.&lt;br /&gt;
&lt;br /&gt;
To simplify the creation of this page, mouse actions are described in writing. &lt;br /&gt;
For example, writing &amp;quot;click on New-&amp;gt;Shortcut&amp;quot; to describe the action of clicking the left mouse button on the &amp;quot;New&amp;quot; drop down menu and then clicking the &amp;quot;Shortcut&amp;quot; choice.&lt;br /&gt;
You are free to edit this page and provide screenshots if you think it necessary.&lt;br /&gt;
&lt;br /&gt;
Terminal windows must be opened and closed.  The next sub-sections describe how to do that.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Terminal Window ===&lt;br /&gt;
&lt;br /&gt;
;On MS Windows&lt;br /&gt;
: Click &amp;quot;Start&amp;quot; -&amp;gt; type &amp;quot;wt&amp;quot; -&amp;gt; click &amp;quot;Open&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Older Microsoft Windows installations did not ship Windows Terminal.&lt;br /&gt;
Users on older systems can download Windows Terminal from the Microsoft Store:&lt;br /&gt;
Click Search -&amp;gt; type &amp;quot;micosoft store&amp;quot; -&amp;gt; click on Microsoft Store -&amp;gt; Search -&amp;gt; type &amp;quot;windows terminal&amp;quot; -&amp;gt; Click the Install/Get button&lt;br /&gt;
&lt;br /&gt;
;On Mac OS/X&lt;br /&gt;
: Finder -&amp;gt; Go -&amp;gt; Utilities -&amp;gt; Terminal&lt;br /&gt;
&lt;br /&gt;
=== Closing a Terminal Window ===&lt;br /&gt;
&lt;br /&gt;
;MS Windows&lt;br /&gt;
: Close the terminal window.&lt;br /&gt;
;Mac OS/X&lt;br /&gt;
: Just closing the terminal window does not stop the terminal program.  You must &amp;quot;File -&amp;gt; Quit&amp;quot; the terminal program.&lt;br /&gt;
&lt;br /&gt;
== Initial VPN Setup ==&lt;br /&gt;
&lt;br /&gt;
There are 5 steps to initial VPN setup:&lt;br /&gt;
&lt;br /&gt;
# Agree on a VPN login name with your SokweDB administrator&lt;br /&gt;
# Create a digital identity&lt;br /&gt;
# Email Your Identity to the SokweDB Administrator&lt;br /&gt;
# Create a desktop icon&lt;br /&gt;
# Approve the VPN connection&lt;br /&gt;
&lt;br /&gt;
=== Agree on a VPN Login Name ===&lt;br /&gt;
&lt;br /&gt;
The VPN requires a login name to authenticate you.&lt;br /&gt;
Both you and your SokweDGB administrator must know what it is, although it is written into files so neither of you need remember it after your VPN is set-up.&lt;br /&gt;
&lt;br /&gt;
Contact your SokweDB administrator and agree on a VPN login name.&lt;br /&gt;
&lt;br /&gt;
The name must meet Unix login name conventions.&lt;br /&gt;
Best are names less than 32 characters long, beginning with a letter, consisting of only lower case letters, digits, the underscore character, and the dash character.&lt;br /&gt;
(No spaces are allowed.)&lt;br /&gt;
&lt;br /&gt;
The VPN login name is needed for the [[#Create a Desktop Icon|desktop icon creation step]].&lt;br /&gt;
&lt;br /&gt;
Having agreed on a VPN login name you can complete the VPN setup on your computer(s).&lt;br /&gt;
(But note that until the SokweDB administrator has done the server-side setup you will not be able to use the VPN, instead receiving a &amp;quot;Permission denied (publickey)&amp;quot; message.)&lt;br /&gt;
&lt;br /&gt;
=== Create a Digital Identity ===&lt;br /&gt;
&lt;br /&gt;
If you already have an OpenSSH public/private key pair you don&amp;#039;t need another.&lt;br /&gt;
Skip this step and go directly to the [[#Create a Desktop Icon|next step]].&lt;br /&gt;
&lt;br /&gt;
==== About Your Digital Identity ====&lt;br /&gt;
&lt;br /&gt;
Digital identities are like regular identities, you only want one.  Or at least you only want one of any particular type, just as you might have both a driver&amp;#039;s licence and a passport.&lt;br /&gt;
&lt;br /&gt;
Feel free to skip the following sub-section unless you have interest.&lt;br /&gt;
&lt;br /&gt;
===== How it Works =====&lt;br /&gt;
The process described here creates an identity known as a public/private [https://en.wikipedia.org/wiki/Public-key_cryptography key pair].&lt;br /&gt;
This identity is stored in files in an [https://en.wikipedia.org/wiki/Openssh OpenSSH] compatible data format.&lt;br /&gt;
These files contain plain text.&lt;br /&gt;
&lt;br /&gt;
As you will see, this makes it easy to inform others of your identity by cutting and pasting the plain text into emails and the like.&lt;br /&gt;
The recipient then knows who you are and can grant your identity access to protected resources.&lt;br /&gt;
&lt;br /&gt;
Briefly, a key pair identity has two parts, a secret part and a public part, each stored in a separate file.&lt;br /&gt;
The secret part should be kept safe and never be revealed.&lt;br /&gt;
The public part can be shared with anyone, it is what identifies you to the other party.&lt;br /&gt;
&lt;br /&gt;
In our application the public part acts like a lock.&lt;br /&gt;
It protects against unauthorized access, preventing people who are not you from accessing database content.&lt;br /&gt;
The private part acts like a key, opening the lock and giving you database access.&lt;br /&gt;
&lt;br /&gt;
For added security it is possible to put a password on the secret key part, preventing its use without the password.&lt;br /&gt;
We don&amp;#039;t require this.&lt;br /&gt;
Others do, so if you already have a key pair your secret key may be password protected.&lt;br /&gt;
&lt;br /&gt;
==== Steps to Create a Public/Private Key Pair  ====&lt;br /&gt;
&lt;br /&gt;
This section presents text to be cut from here and pasted into a terminal window.&lt;br /&gt;
When cutting and pasting, be sure to replace the marked text with appropriate identifying information, like your name.&lt;br /&gt;
&lt;br /&gt;
* [[#Open a Terminal Window|Open a terminal window]].&lt;br /&gt;
* Create a Public/Private Key pair on:&lt;br /&gt;
** [[Create a Public/Private Key pair on MS Windows|MS Windows]]&lt;br /&gt;
** [[Create a Public/Private Key pair on Mac OS/X|Mac OS/X]] (or other systems which support the bash shell)&lt;br /&gt;
&lt;br /&gt;
==== Backup Your Digital Identity (Key Pair) ====&lt;br /&gt;
&lt;br /&gt;
At this point it is a good idea to backup your identity.&lt;br /&gt;
The section on [[#Using the VPN From Multiple Computers|installing the VPN on a 2nd computer]] says what files need copying.&lt;br /&gt;
The section also, in effect, documents how to restore your identity from a backup.&lt;br /&gt;
&lt;br /&gt;
Again, your private key (file &amp;lt;code&amp;gt;id_ed25519&amp;lt;/code&amp;gt;) should be kept secret and secured.&lt;br /&gt;
Anyone who has it can impersonate you.&lt;br /&gt;
Keep your backup in a safe and secure place.&lt;br /&gt;
&lt;br /&gt;
Note that USB sticks lose their memory if not plugged in every couple of years.&lt;br /&gt;
&lt;br /&gt;
=== Email Your Identity to the SokweDB Administrator ===&lt;br /&gt;
&lt;br /&gt;
Copy and paste your public key into an email to the SokweDB administrator.&lt;br /&gt;
It wouldn&amp;#039;t hurt to remind them of the [[#Agree on a VPN Login Name|VPN login name]] you have both agreed on.&lt;br /&gt;
They will [[VPN User Management|create a VPN user]] and get back to you when the server-side of your VPN is ready to use.&lt;br /&gt;
&lt;br /&gt;
Follow [[#Showing Your Identity (Your Public Key)|these instructions]] if you don&amp;#039;t know your public key.&lt;br /&gt;
&lt;br /&gt;
You may now [[#Closing a Terminal Window|close the terminal window]] or otherwise stop the terminal program.&lt;br /&gt;
&lt;br /&gt;
=== Create a Desktop Icon ===&lt;br /&gt;
&lt;br /&gt;
You will use this icon to start the VPN.  For convenience we are creating it on your desktop.  Feel free to move it elsewhere.&lt;br /&gt;
&lt;br /&gt;
Likewise, the icon image is the default.  You may change it as desired.&lt;br /&gt;
&lt;br /&gt;
Create a desktop icon on:&lt;br /&gt;
* [[Creating an Icon on MS Windows|MS Windows]]&lt;br /&gt;
* [[Creating an Icon on Mac OS/X|Mac OS/X]]&lt;br /&gt;
&lt;br /&gt;
=== Approve the VPN Connection ===&lt;br /&gt;
&lt;br /&gt;
The first time you use the VPN your computer asks to validate that the server connected to is the server which is expected (and not some malicious computer masquerading as same).&lt;br /&gt;
&lt;br /&gt;
* Start the VPN with the icon&lt;br /&gt;
* The VPN&amp;#039;s terminal window will ask:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;The authenticity of host &amp;#039;sokwe.janegoodall.org (20.119.86.26)&amp;#039; can&amp;#039;t be established.&lt;br /&gt;
ED25519 key fingerprint is &lt;br /&gt;
SHA256:10oDrQQDHNicqZn2BYBWQpUazSBCO6Hvabuz9GRMmqE.&lt;br /&gt;
This key is not known by any other names.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no/[fingerprint])?&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your display shows the above fingerprint (the part that begins with SHA256:..) there are no malicious actors and you may type &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt;.  (Press the &amp;quot;Enter&amp;quot; key after.)&lt;br /&gt;
&lt;br /&gt;
If the fingerprint is not exactly the same as that above say &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; and contact your SokweDB administrator.&lt;br /&gt;
&lt;br /&gt;
NOTE: At this point the SokweDB administrator may or may not have set up the server-side of your VPN.&lt;br /&gt;
If not, you will get a &amp;quot;Permission denied&amp;quot; message after answering &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Regardless of whether VPN startup is successful, once you approve the VPN connection by answering &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; you will not have to do so again.  Or at least not until you install the VPN on another computer.&lt;br /&gt;
&lt;br /&gt;
When done, shut down the VPN and [[#Closing a Terminal Window|close the terminal]].&lt;br /&gt;
&lt;br /&gt;
You have completed the VPN setup.  After your SokweDB administrator tells you the server-side is ready, [[VPN#Using the VPN|test]] with your favorite PostgreSQL-aware desktop application.&lt;br /&gt;
&lt;br /&gt;
== Showing Your Identity (Your Public Key) ==&lt;br /&gt;
&lt;br /&gt;
You can always retrieve your public key with the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[#Open a Terminal Window|Open a terminal window]].&lt;br /&gt;
* Paste the following into the window and press the &amp;quot;Enter&amp;quot; key on the keyboard:&lt;br /&gt;
&lt;br /&gt;
* On MS Windows:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;type $HOME/.ssh/id_ed25519.pub&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On Mac OS/X (or any system supporting &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;cat ~/.ssh/id_ed25519.pub&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line printed, a long line beginning with &amp;quot;ssh-ed25519&amp;quot;, is your public key.&lt;br /&gt;
&lt;br /&gt;
== Using the VPN From Multiple Computers ==&lt;br /&gt;
&lt;br /&gt;
The VPN must be installed on each computer which uses it.  &lt;br /&gt;
This is usually best done by copying from &amp;#039;&amp;#039;your&amp;#039;&amp;#039; existing installation (not someone else&amp;#039;s files).&lt;br /&gt;
Don&amp;#039;t share your identity or copy someone else&amp;#039;s identity files!&lt;br /&gt;
&lt;br /&gt;
Once you have created a digital identity you can re-use that identity on multiple computers.  Creating multiple identities leads to confusion and is not recommended.&lt;br /&gt;
&lt;br /&gt;
Take the following steps to use the VPN on another computer.&lt;br /&gt;
&lt;br /&gt;
=== Copy your Identity ===&lt;br /&gt;
&lt;br /&gt;
Copy (from a backup?) the identity you have on your old computer to your new computer.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Do not reveal your private key!&amp;#039;&amp;#039;&lt;br /&gt;
Do not use a cloud service or other third party to copy your private key onto another computers.&lt;br /&gt;
&lt;br /&gt;
How to copy files and folders between computers is beyond the scope of this document.&lt;br /&gt;
Minimally, you must copy your public and private key files, the &amp;lt;code&amp;gt;id_ed25519&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;id_ed25519.pub&amp;lt;/code&amp;gt; files in your &amp;lt;code&amp;gt;~/.ssh/&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
But if your second computer does not have a &amp;lt;code&amp;gt;~/.ssh/&amp;lt;/code&amp;gt; folder, instead copy the entire folder and its contents.&lt;br /&gt;
The folder to copy, where &amp;quot;YOU&amp;quot; is your login name on your computer, is:&lt;br /&gt;
;On MS Windows (usually)&lt;br /&gt;
: &amp;lt;code&amp;gt;C:\Users\YOU\.ssh\&amp;lt;/code&amp;gt;&lt;br /&gt;
If you use Windows file explorer, the address bar will look something like &amp;lt;code&amp;gt;This PC &amp;gt; OSDisk (C:) &amp;gt; Users &amp;gt; YOU&amp;lt;/code&amp;gt;.&lt;br /&gt;
You can also copy the [[#Create a Desktop Icon|desktop icon]] that you created previously.&lt;br /&gt;
;On Mac OS/X&lt;br /&gt;
: &amp;lt;code&amp;gt;/Users/YOU/.ssh/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not only must the &amp;lt;code&amp;gt;~/.ssh/&amp;lt;/code&amp;gt; folder structure be copied, but the permissions must be copied as well.&lt;br /&gt;
If permissions are not copied your private key will not be secure and the VPN will then refuse to use it!&lt;br /&gt;
This is a common cause of &amp;lt;code&amp;gt;Permission denied (publickey)&amp;lt;/code&amp;gt; errors.&lt;br /&gt;
If your copy method does not copy permissions, on Mac OS and Unix-like systems the permissions may be reset manually by running the following command [[#Opening a Terminal Window|in a terminal]]:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;chmod g=,o= ~/.ssh ~/.ssh/id_ed25519&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It never hurts to run the above command.&lt;br /&gt;
&lt;br /&gt;
=== Get a VPN Icon onto the New Computer ===&lt;br /&gt;
&lt;br /&gt;
Copying the SokweDB VPN&amp;#039;s icon between computers should usually work.  If it does not, [[#Create a Desktop Icon|create a desktop icon]] from scratch on the new computer.&lt;br /&gt;
&lt;br /&gt;
=== Approve the VPN Connection ===&lt;br /&gt;
[[#Approve the VPN Connection|Approve the VPN connection]] on the new computer.&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=VPN_Setup&amp;diff=335</id>
		<title>VPN Setup</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=VPN_Setup&amp;diff=335"/>
		<updated>2024-02-09T16:42:36Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: /* Copy your Identity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to setup a computer so that it runs the SokweDB VPN, allowing programs on the computer to connect directly to the SokweDB database.&lt;br /&gt;
&lt;br /&gt;
The estimated setup time is 15 minutes.  &lt;br /&gt;
Communication is involved so more than one sitting is required, increasing the total start-to-finish time beyond 15 minutes.&lt;br /&gt;
The setup time may vary widely, depending on whether you read the entire section on digital identity, how much time you spend talking with the SokweDB administrator, how testing goes, and whether you setup on multiple computers.&lt;br /&gt;
Time must also be spent on downloading, installing, configuring, and testing whatever database-aware programs you wish to have on your computer.&lt;br /&gt;
&lt;br /&gt;
Note that once you have created a digital identity you should [[#Using the VPN From Multiple Computers|re-use it]], on different computers, instead of creating multiple identities.&lt;br /&gt;
&lt;br /&gt;
== Navigating the Installation Process ==&lt;br /&gt;
&lt;br /&gt;
The [[#Initial VPN Setup|Initial VPN Setup]] section can be completed in one sitting, once the SokweDB administrator is in contact so you can get started and agree on a [[#Agree on a VPN Login Name|VPN login name]].&lt;br /&gt;
But testing and [[VPN#Using the VPN|VPN use]] will have to wait for the administrator to [[VPN User Management|setup]] the VPN&amp;#039;s server-side.&lt;br /&gt;
&lt;br /&gt;
The SokweDB VPN is constructed from the existing components of your computer&amp;#039;s Operating System.&lt;br /&gt;
This keep-it-simple approach means that there is no installation program, you will need to follow some instructions to get set-up.&lt;br /&gt;
These involve some cutting and pasting of entire blocks of command lines, the details of which you need not be concerned.&lt;br /&gt;
MS Windows users will also have to use the mouse to create a shortcut icon on the desktop.&lt;br /&gt;
Worst-case, someone else can take remote-control of your computer and set things up for you.&lt;br /&gt;
&lt;br /&gt;
When cutting and pasting, cut and paste entire blocks of text as presented in the document, not individual lines.&lt;br /&gt;
After pasting into a terminal window, the &amp;quot;Enter&amp;quot; key on the keyboard must be pressed.&lt;br /&gt;
&lt;br /&gt;
To simplify the creation of this page, mouse actions are described in writing. &lt;br /&gt;
For example, writing &amp;quot;click on New-&amp;gt;Shortcut&amp;quot; to describe the action of clicking the left mouse button on the &amp;quot;New&amp;quot; drop down menu and then clicking the &amp;quot;Shortcut&amp;quot; choice.&lt;br /&gt;
You are free to edit this page and provide screenshots if you think it necessary.&lt;br /&gt;
&lt;br /&gt;
Terminal windows must be opened and closed.  The next sub-sections describe how to do that.&lt;br /&gt;
&lt;br /&gt;
=== Opening a Terminal Window ===&lt;br /&gt;
&lt;br /&gt;
;On MS Windows&lt;br /&gt;
: Click &amp;quot;Start&amp;quot; -&amp;gt; type &amp;quot;wt&amp;quot; -&amp;gt; click &amp;quot;Open&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Older Microsoft Windows installations did not ship Windows Terminal.&lt;br /&gt;
Users on older systems can download Windows Terminal from the Microsoft Store:&lt;br /&gt;
Click Search -&amp;gt; type &amp;quot;micosoft store&amp;quot; -&amp;gt; click on Microsoft Store -&amp;gt; Search -&amp;gt; type &amp;quot;windows terminal&amp;quot; -&amp;gt; Click the Install/Get button&lt;br /&gt;
&lt;br /&gt;
;On Mac OS/X&lt;br /&gt;
: Finder -&amp;gt; Go -&amp;gt; Utilities -&amp;gt; Terminal&lt;br /&gt;
&lt;br /&gt;
=== Closing a Terminal Window ===&lt;br /&gt;
&lt;br /&gt;
;MS Windows&lt;br /&gt;
: Close the terminal window.&lt;br /&gt;
;Mac OS/X&lt;br /&gt;
: Just closing the terminal window does not stop the terminal program.  You must &amp;quot;File -&amp;gt; Quit&amp;quot; the terminal program.&lt;br /&gt;
&lt;br /&gt;
== Initial VPN Setup ==&lt;br /&gt;
&lt;br /&gt;
There are 5 steps to initial VPN setup:&lt;br /&gt;
&lt;br /&gt;
# Agree on a VPN login name with your SokweDB administrator&lt;br /&gt;
# Create a digital identity&lt;br /&gt;
# Email Your Identity to the SokweDB Administrator&lt;br /&gt;
# Create a desktop icon&lt;br /&gt;
# Approve the VPN connection&lt;br /&gt;
&lt;br /&gt;
=== Agree on a VPN Login Name ===&lt;br /&gt;
&lt;br /&gt;
The VPN requires a login name to authenticate you.&lt;br /&gt;
Both you and your SokweDGB administrator must know what it is, although it is written into files so neither of you need remember it after your VPN is set-up.&lt;br /&gt;
&lt;br /&gt;
Contact your SokweDB administrator and agree on a VPN login name.&lt;br /&gt;
&lt;br /&gt;
The name must meet Unix login name conventions.&lt;br /&gt;
Best are names less than 32 characters long, beginning with a letter, consisting of only lower case letters, digits, the underscore character, and the dash character.&lt;br /&gt;
(No spaces are allowed.)&lt;br /&gt;
&lt;br /&gt;
The VPN login name is needed for the [[#Create a Desktop Icon|desktop icon creation step]].&lt;br /&gt;
&lt;br /&gt;
Having agreed on a VPN login name you can complete the VPN setup on your computer(s).&lt;br /&gt;
(But note that until the SokweDB administrator has done the server-side setup you will not be able to use the VPN, instead receiving a &amp;quot;Permission denied (publickey)&amp;quot; message.)&lt;br /&gt;
&lt;br /&gt;
=== Create a Digital Identity ===&lt;br /&gt;
&lt;br /&gt;
If you already have an OpenSSH public/private key pair you don&amp;#039;t need another.&lt;br /&gt;
Skip this step and go directly to the [[#Create a Desktop Icon|next step]].&lt;br /&gt;
&lt;br /&gt;
==== About Your Digital Identity ====&lt;br /&gt;
&lt;br /&gt;
Digital identities are like regular identities, you only want one.  Or at least you only want one of any particular type, just as you might have both a driver&amp;#039;s licence and a passport.&lt;br /&gt;
&lt;br /&gt;
Feel free to skip the following sub-section unless you have interest.&lt;br /&gt;
&lt;br /&gt;
===== How it Works =====&lt;br /&gt;
The process described here creates an identity known as a public/private [https://en.wikipedia.org/wiki/Public-key_cryptography key pair].&lt;br /&gt;
This identity is stored in files in an [https://en.wikipedia.org/wiki/Openssh OpenSSH] compatible data format.&lt;br /&gt;
These files contain plain text.&lt;br /&gt;
&lt;br /&gt;
As you will see, this makes it easy to inform others of your identity by cutting and pasting the plain text into emails and the like.&lt;br /&gt;
The recipient then knows who you are and can grant your identity access to protected resources.&lt;br /&gt;
&lt;br /&gt;
Briefly, a key pair identity has two parts, a secret part and a public part, each stored in a separate file.&lt;br /&gt;
The secret part should be kept safe and never be revealed.&lt;br /&gt;
The public part can be shared with anyone, it is what identifies you to the other party.&lt;br /&gt;
&lt;br /&gt;
In our application the public part acts like a lock.&lt;br /&gt;
It protects against unauthorized access, preventing people who are not you from accessing database content.&lt;br /&gt;
The private part acts like a key, opening the lock and giving you database access.&lt;br /&gt;
&lt;br /&gt;
For added security it is possible to put a password on the secret key part, preventing its use without the password.&lt;br /&gt;
We don&amp;#039;t require this.&lt;br /&gt;
Others do, so if you already have a key pair your secret key may be password protected.&lt;br /&gt;
&lt;br /&gt;
==== Steps to Create a Public/Private Key Pair  ====&lt;br /&gt;
&lt;br /&gt;
This section presents text to be cut from here and pasted into a terminal window.&lt;br /&gt;
When cutting and pasting, be sure to replace the marked text with appropriate identifying information, like your name.&lt;br /&gt;
&lt;br /&gt;
* [[#Open a Terminal Window|Open a terminal window]].&lt;br /&gt;
* Create a Public/Private Key pair on:&lt;br /&gt;
** [[Create a Public/Private Key pair on MS Windows|MS Windows]]&lt;br /&gt;
** [[Create a Public/Private Key pair on Mac OS/X|Mac OS/X]] (or other systems which support the bash shell)&lt;br /&gt;
&lt;br /&gt;
==== Backup Your Digital Identity (Key Pair) ====&lt;br /&gt;
&lt;br /&gt;
At this point it is a good idea to backup your identity.&lt;br /&gt;
The section on [[#Using the VPN From Multiple Computers|installing the VPN on a 2nd computer]] says what files need copying.&lt;br /&gt;
The section also, in effect, documents how to restore your identity from a backup.&lt;br /&gt;
&lt;br /&gt;
Again, your private key (file &amp;lt;code&amp;gt;id_ed25519&amp;lt;/code&amp;gt;) should be kept secret and secured.&lt;br /&gt;
Anyone who has it can impersonate you.&lt;br /&gt;
Keep your backup in a safe and secure place.&lt;br /&gt;
&lt;br /&gt;
Note that USB sticks lose their memory if not plugged in every couple of years.&lt;br /&gt;
&lt;br /&gt;
=== Email Your Identity to the SokweDB Administrator ===&lt;br /&gt;
&lt;br /&gt;
Copy and paste your public key into an email to the SokweDB administrator.&lt;br /&gt;
It wouldn&amp;#039;t hurt to remind them of the [[#Agree on a VPN Login Name|VPN login name]] you have both agreed on.&lt;br /&gt;
They will [[VPN User Management|create a VPN user]] and get back to you when the server-side of your VPN is ready to use.&lt;br /&gt;
&lt;br /&gt;
Follow [[#Showing Your Identity (Your Public Key)|these instructions]] if you don&amp;#039;t know your public key.&lt;br /&gt;
&lt;br /&gt;
You may now [[#Closing a Terminal Window|close the terminal window]] or otherwise stop the terminal program.&lt;br /&gt;
&lt;br /&gt;
=== Create a Desktop Icon ===&lt;br /&gt;
&lt;br /&gt;
You will use this icon to start the VPN.  For convenience we are creating it on your desktop.  Feel free to move it elsewhere.&lt;br /&gt;
&lt;br /&gt;
Likewise, the icon image is the default.  You may change it as desired.&lt;br /&gt;
&lt;br /&gt;
Create a desktop icon on:&lt;br /&gt;
* [[Creating an Icon on MS Windows|MS Windows]]&lt;br /&gt;
* [[Creating an Icon on Mac OS/X|Mac OS/X]]&lt;br /&gt;
&lt;br /&gt;
=== Approve the VPN Connection ===&lt;br /&gt;
&lt;br /&gt;
The first time you use the VPN your computer asks to validate that the server connected to is the server which is expected (and not some malicious computer masquerading as same).&lt;br /&gt;
&lt;br /&gt;
* Start the VPN with the icon&lt;br /&gt;
* The VPN&amp;#039;s terminal window will ask:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;The authenticity of host &amp;#039;sokwe.janegoodall.org (20.119.86.26)&amp;#039; can&amp;#039;t be established.&lt;br /&gt;
ED25519 key fingerprint is &lt;br /&gt;
SHA256:10oDrQQDHNicqZn2BYBWQpUazSBCO6Hvabuz9GRMmqE.&lt;br /&gt;
This key is not known by any other names.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no/[fingerprint])?&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your display shows the above fingerprint (the part that begins with SHA256:..) there are no malicious actors and you may type &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt;.  (Press the &amp;quot;Enter&amp;quot; key after.)&lt;br /&gt;
&lt;br /&gt;
If the fingerprint is not exactly the same as that above say &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; and contact your SokweDB administrator.&lt;br /&gt;
&lt;br /&gt;
NOTE: At this point the SokweDB administrator may or may not have set up the server-side of your VPN.&lt;br /&gt;
If not, you will get a &amp;quot;Permission denied&amp;quot; message after answering &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Regardless of whether VPN startup is successful, once you approve the VPN connection by answering &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; you will not have to do so again.  Or at least not until you install the VPN on another computer.&lt;br /&gt;
&lt;br /&gt;
When done, shut down the VPN and [[#Closing a Terminal Window|close the terminal]].&lt;br /&gt;
&lt;br /&gt;
You have completed the VPN setup.  After your SokweDB administrator tells you the server-side is ready, [[VPN#Using the VPN|test]] with your favorite PostgreSQL-aware desktop application.&lt;br /&gt;
&lt;br /&gt;
== Showing Your Identity (Your Public Key) ==&lt;br /&gt;
&lt;br /&gt;
You can always retrieve your public key with the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[#Open a Terminal Window|Open a terminal window]].&lt;br /&gt;
* Paste the following into the window and press the &amp;quot;Enter&amp;quot; key on the keyboard:&lt;br /&gt;
&lt;br /&gt;
* On MS Windows:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;type $HOME/.ssh/id_ed25519.pub&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On Mac OS/X (or any system supporting &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;cat ~/.ssh/id_ed25519.pub&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line printed, a long line beginning with &amp;quot;ssh-ed25519&amp;quot;, is your public key.&lt;br /&gt;
&lt;br /&gt;
== Using the VPN From Multiple Computers ==&lt;br /&gt;
&lt;br /&gt;
The VPN must be installed on each computer which uses it.  &lt;br /&gt;
This is usually best done by copying from &amp;#039;&amp;#039;your&amp;#039;&amp;#039; existing installation (not someone else&amp;#039;s files).&lt;br /&gt;
Don&amp;#039;t share your identity or copy someone else&amp;#039;s identity files!&lt;br /&gt;
&lt;br /&gt;
Once you have created a digital identity you can re-use that identity on multiple computers.  Creating multiple identities leads to confusion and is not recommended.&lt;br /&gt;
&lt;br /&gt;
Take the following steps to use the VPN on another computer.&lt;br /&gt;
&lt;br /&gt;
=== Copy your Identity ===&lt;br /&gt;
&lt;br /&gt;
Copy (from a backup?) the identity you have on your old computer to your new computer.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Do not reveal your private key!&amp;#039;&amp;#039;&lt;br /&gt;
Do not use a cloud service or other third party to copy your private key onto another computers.&lt;br /&gt;
&lt;br /&gt;
How to copy files and folders between computers is beyond the scope of this document.&lt;br /&gt;
Minimally, you must copy your public and private key files, the &amp;lt;code&amp;gt;id_ed25519&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;id_ed25519.pub&amp;lt;/code&amp;gt; files in your &amp;lt;code&amp;gt;~/.ssh/&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
But if your second computer does not have a &amp;lt;code&amp;gt;~/.ssh/&amp;lt;/code&amp;gt; folder, instead copy the entire folder and its contents.&lt;br /&gt;
The folder to copy, where &amp;quot;YOU&amp;quot; is your login name on your computer, is:&lt;br /&gt;
;On MS Windows (usually)&lt;br /&gt;
: &amp;lt;code&amp;gt;C:\Users\YOU\.ssh\&amp;lt;/code&amp;gt;&lt;br /&gt;
Alternatively, if you use Windows file explorer, the address bar will look something like &amp;lt;code&amp;gt;This PC &amp;gt; OSDisk (C:) &amp;gt; Users &amp;gt; YOU&amp;lt;/code&amp;gt;.&lt;br /&gt;
You can also copy the [[#Creating_an_Icon_on_MS_Windows|Desktop icon]] that you created previously.&lt;br /&gt;
;On Mac OS/X&lt;br /&gt;
: &amp;lt;code&amp;gt;/Users/YOU/.ssh/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not only must the &amp;lt;code&amp;gt;~/.ssh/&amp;lt;/code&amp;gt; folder structure be copied, but the permissions must be copied as well.&lt;br /&gt;
If permissions are not copied your private key will not be secure and the VPN will then refuse to use it!&lt;br /&gt;
This is a common cause of &amp;lt;code&amp;gt;Permission denied (publickey)&amp;lt;/code&amp;gt; errors.&lt;br /&gt;
If your copy method does not copy permissions, on Mac OS and Unix-like systems the permissions may be reset manually by running the following command [[#Opening a Terminal Window|in a terminal]]:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;chmod g=,o= ~/.ssh ~/.ssh/id_ed25519&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It never hurts to run the above command.&lt;br /&gt;
&lt;br /&gt;
=== Get a VPN Icon onto the New Computer ===&lt;br /&gt;
&lt;br /&gt;
Copying the SokweDB VPN&amp;#039;s icon between computers should usually work.  If it does not, [[#Create a Desktop Icon|create a desktop icon]] from scratch on the new computer.&lt;br /&gt;
&lt;br /&gt;
=== Approve the VPN Connection ===&lt;br /&gt;
[[#Approve the VPN Connection|Approve the VPN connection]] on the new computer.&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Maintaining_Python_Virtual_Environments&amp;diff=280</id>
		<title>Maintaining Python Virtual Environments</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Maintaining_Python_Virtual_Environments&amp;diff=280"/>
		<updated>2023-12-16T16:52:48Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: add reminder to update requirements file after upgrading venvs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Revision Control Support ==&lt;br /&gt;
Tools to create and manage Python [https://docs.python.org/3/library/venv.html virtual environments] are in the [https://sokwe.janegoodall.org/git/?p=sokwe_server;a=tree sokwe_server code repository].&lt;br /&gt;
&lt;br /&gt;
After checking out the repository, make the repo your current working directory and get help with:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;make help&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Package Update ==&lt;br /&gt;
To update a particular package in a venv to the latest version (run from a regular developer login, not root) follow the instructions found in the [https://sokwe.janegoodall.org/git/?p=sokwe_server;a=summary sokwe_server] repository&amp;#039;s [https://sokwe.janegoodall.org/git/?p=sokwe_server;a=blob_plain;f=Makefile;hb=HEAD Makefile].&lt;br /&gt;
The instructions are presented by running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;make | less&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After upgrading a package, update the corresponding requirements file then be sure to commit the change to the &amp;lt;code&amp;gt;sokwe_server&amp;lt;/code&amp;gt; code repository.&lt;br /&gt;
The instructions make presents explain how.&lt;br /&gt;
This allows others, perhaps a future-you, to re-create an identical environment.&lt;br /&gt;
&lt;br /&gt;
It is also safe to delete the entire virtual environment and re-create it with the latest available packages, although this will lead to interruption of service.&lt;br /&gt;
Again, the &amp;lt;code&amp;gt;sokwe_server&amp;lt;/code&amp;gt; repository should be updated to record the new package versions.&lt;br /&gt;
&lt;br /&gt;
== Service Restart ==&lt;br /&gt;
&lt;br /&gt;
After a change to the virtual environment all daemons which use the virtual environment must be restarted.  This varies by virtual environment.&lt;br /&gt;
&lt;br /&gt;
=== PgAdmin4 ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;systemctl restart pgadmin4_gnunicorn&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Create_a_Public/Private_Key_pair_on_MS_Windows&amp;diff=257</id>
		<title>Create a Public/Private Key pair on MS Windows</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Create_a_Public/Private_Key_pair_on_MS_Windows&amp;diff=257"/>
		<updated>2023-11-22T22:15:51Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following steps create a public/private key pair (a digital identity) on Microsoft Windows:&lt;br /&gt;
&lt;br /&gt;
* Supply your name and address.  Type the following into the terminal window and press the &amp;quot;Enter&amp;quot; key, substituting your name and email in the requisite spot.  If you make a mistake, type it again.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;$NAME_EMAIL=&amp;quot;First Last &amp;lt;myself@example.com&amp;gt;&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Show your digital identity (the public key half), creating an identity if it does not exist.  Cut and paste the following blocks of commands into the terminal window.  Press the &amp;quot;Enter&amp;quot; key after pasting.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;if (!(Test-Path -Path $HOME\.ssh)) {&lt;br /&gt;
  New-Item -Path $HOME\.ssh -ItemType Directory&lt;br /&gt;
}&lt;br /&gt;
if (!(Test-Path -Path $HOME\.ssh\id_ed25519)) {&lt;br /&gt;
  ssh-keygen.exe -t ed25519 -f $HOME\.ssh\id_ed25519 -a 100 -C ${NAME_EMAIL} -N &amp;#039;&amp;quot;&amp;quot;&amp;#039;&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your terminal window will afterward contain text similar to this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Your identification has been saved in C:\Users\myself\.ssh\id_ed25519&lt;br /&gt;
Your public key has been saved in C:\Users\myself\.ssh\id_ed25519.pub&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
SHA256:RS/EcUuHR8w75KpvXoWj/2xNzMBnkAMhFYImOQMLUes First Last &amp;lt;myself@example.com&amp;gt;&lt;br /&gt;
The key&amp;#039;s randomart image is:&lt;br /&gt;
+--[ED25519 256]--+&lt;br /&gt;
|  ooo. . o*oBOo. |&lt;br /&gt;
|   . o= oo.*.oO  |&lt;br /&gt;
|    o  =  o o= + |&lt;br /&gt;
|   .     . .  *.o|&lt;br /&gt;
|    E   S    .oB.|&lt;br /&gt;
|            .. o+|&lt;br /&gt;
|           .. ...|&lt;br /&gt;
|          . .o .o|&lt;br /&gt;
|           +o .oo|&lt;br /&gt;
+----[SHA256]-----+&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lastly, cut and paste the following text and press the &amp;quot;Enter&amp;quot; key:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;type $HOME\.ssh\id_ed25519.pub&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output from should look similar to this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEay3Ro8xHXJrxfDbhm5jUSqZ3tHjXLBzhcLbIaVwNIT First Last &amp;lt;myself@example.com&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That long line beginning with &amp;quot;ssh-ed25519&amp;quot; and ending with your name and email is your public key.  You&amp;#039;re going to copy and paste the whole line into an email&lt;br /&gt;
in the step after next.&lt;br /&gt;
----&lt;br /&gt;
[[VPN Setup#Steps to Create a Public/Private Key Pair|Back to the VPN Setup page]]&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Creating_an_Icon_on_MS_Windows&amp;diff=245</id>
		<title>Creating an Icon on MS Windows</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Creating_an_Icon_on_MS_Windows&amp;diff=245"/>
		<updated>2023-11-18T00:22:41Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Create a icon to start the SokweDB VPN on your Microsoft Windows desktop with the following procedure:&lt;br /&gt;
----&lt;br /&gt;
* Press the right-side mouse button on an empty portion of your desktop.&lt;br /&gt;
* Click on New -&amp;gt; Shortcut in the resulting menu&lt;br /&gt;
* Enter &amp;lt;code&amp;gt;wt ssh -L 5432:sokwe-dbs.postgres.database.azure.com:5432 -l YOU sokwe.janegoodall.org&amp;lt;/code&amp;gt; in the &amp;quot;Type the location of the item:&amp;quot; field&lt;br /&gt;
* Change the &amp;quot;YOU&amp;quot; in the line above to the VPN login name that you and the SowkeDB administrator [[#Agree on a VPN Login Name|agreed upon]].&lt;br /&gt;
* Click the &amp;quot;Next&amp;quot; button&lt;br /&gt;
* Enter &amp;quot;SokweDB_VPN&amp;quot; as the name of the shortcut&lt;br /&gt;
* Click the &amp;quot;Finish&amp;quot; button&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Now go back to the [[VPN Setup#Create a Desktop Icon|VPN Setup]] page.&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Create_a_Public/Private_Key_pair_on_MS_Windows&amp;diff=235</id>
		<title>Create a Public/Private Key pair on MS Windows</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Create_a_Public/Private_Key_pair_on_MS_Windows&amp;diff=235"/>
		<updated>2023-11-15T23:25:35Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: adjust Windows instructions for Powershell&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following steps create a public/private key pair (a digital identity) on Microsoft Windows:&lt;br /&gt;
&lt;br /&gt;
* Supply your name and address.  Type the following into the terminal window and press the &amp;quot;Enter&amp;quot; key, substituting your name and email in the requisite spot.  If you make a mistake, type it again.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;$NAME_EMAIL=&amp;quot;First Last &amp;lt;myself@example.com&amp;gt;&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Show your digital identity (the public key half), creating an identity if it does not exist.  Cut and paste the following block of commands into the terminal window.  Press the &amp;quot;Enter&amp;quot; key after pasting.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;if (!(Test-Path -Path $HOME\.ssh)) { `&lt;br /&gt;
  New-Item -Path $HOME\.ssh -ItemType Directory `&lt;br /&gt;
} `&lt;br /&gt;
if (!(Test-Path -Path $HOME\.ssh\id_ed25519)) { `&lt;br /&gt;
  ssh-keygen.exe -t ed25519 -f $HOME\.ssh\id_ed25519 -a 100 -C ${NAME_EMAIL} `&lt;br /&gt;
} `&lt;br /&gt;
type $HOME\.ssh\id_ed25519.pub&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your terminal window will afterward contain text similar to this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Your identification has been saved in C:\Users\myself\.ssh\id_ed25519&lt;br /&gt;
Your public key has been saved in C:\Users\myself\.ssh\id_ed25519.pub&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
SHA256:RS/EcUuHR8w75KpvXoWj/2xNzMBnkAMhFYImOQMLUes First Last &amp;lt;myself@example.com&amp;gt;&lt;br /&gt;
The key&amp;#039;s randomart image is:&lt;br /&gt;
+--[ED25519 256]--+&lt;br /&gt;
|  ooo. . o*oBOo. |&lt;br /&gt;
|   . o= oo.*.oO  |&lt;br /&gt;
|    o  =  o o= + |&lt;br /&gt;
|   .     . .  *.o|&lt;br /&gt;
|    E   S    .oB.|&lt;br /&gt;
|            .. o+|&lt;br /&gt;
|           .. ...|&lt;br /&gt;
|          . .o .o|&lt;br /&gt;
|           +o .oo|&lt;br /&gt;
+----[SHA256]-----+&lt;br /&gt;
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEay3Ro8xHXJrxfDbhm5jUSqZ3tHjXLBzhcLbIaVwNIT First Last &amp;lt;myself@example.com&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last line printed, one long line beginning with &amp;quot;ssh-ed25519&amp;quot; and ending with your name and email, is your public key.  You&amp;#039;re going to copy and paste the whole line into an email&lt;br /&gt;
in the step after next.&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Build_System&amp;diff=102</id>
		<title>Build System</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Build_System&amp;diff=102"/>
		<updated>2023-10-12T17:50:38Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: new page for build system&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains notes, examples, and instructions on working with the system that installs software and database structures.&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
	<entry>
		<id>https://sokwe.janegoodall.org/w/index.php?title=Development&amp;diff=101</id>
		<title>Development</title>
		<link rel="alternate" type="text/html" href="https://sokwe.janegoodall.org/w/index.php?title=Development&amp;diff=101"/>
		<updated>2023-10-12T17:47:38Z</updated>

		<summary type="html">&lt;p&gt;StevanEarl: adding a new page for build system notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All changes to database structure, database documentation, bespoke programs, etc. should under revision control -- committed to the SokweDB master software repository.&lt;br /&gt;
&lt;br /&gt;
== Working with the SokweDB Master Software Repository ==&lt;br /&gt;
&lt;br /&gt;
The [https://{{SERVERNAME}}/git/?p=sokwedb SokweDB master software repository] may be browsed on the web.&lt;br /&gt;
&lt;br /&gt;
To push or pull from the master repo while on the &amp;lt;code&amp;gt;sokwe&amp;lt;/code&amp;gt; server, use the respository&amp;#039;s path to identify it.  E.g.:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;git clone /srv/repos/sokwedb&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;git pull /srv/repos/sokwedb&amp;lt;/code&amp;gt;&lt;br /&gt;
 &amp;lt;code&amp;gt;git push /srv/repos/sokwedb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anyone may pull from the master repo over the Internet, with:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;git pull https://sokwe.janegoodall.org/repos/sokwedb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same URL may be used when cloning.&lt;br /&gt;
&lt;br /&gt;
You can perform any operation on the master git repository with &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; and your login.&lt;br /&gt;
E.g. to push to the master repo over the Internet, use:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;git push ssh://YOURLOGIN@sokwe.janegoodall.org/srv/repos/sokwedb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Collaborating on Code; Making Public Repositories ==&lt;br /&gt;
&lt;br /&gt;
One way to let other people see what you&amp;#039;re working on is by creating a publicly available code repository.  Public repositories  on the SokweDB server act like public repositories on other git hosting services such as GitHub, GitLab, etc., although the web-browser facing interface and associated toolkits differs from service to service.  A public repository, no matter the server, is useful when you develop on more than one machine and need to move code between them.&lt;br /&gt;
&lt;br /&gt;
Create a public repository with:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;git init --bare /srv/repos/YOURREPONAME&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;/srv/repos/&amp;lt;/code&amp;gt; directory holds all the shared repositories.&lt;br /&gt;
Repositories in this directory are shared on the server, and publicly available to the word for browsing via the SokweDB website.  &lt;br /&gt;
&lt;br /&gt;
The advantage of sharing is the ability to view each other&amp;#039;s work, work on each other&amp;#039;s branches, etc., without having to make changes to the master repository.&lt;br /&gt;
&lt;br /&gt;
Note that the repositories in &amp;lt;/code&amp;gt;/srv/repos/&amp;lt;/code&amp;gt; must be bare.  This means they contain only revision history and can&amp;#039;t be used for development.  You will need your own repository(ies), in your home directory or elsewhere, for development purposes.&lt;br /&gt;
&lt;br /&gt;
=== Permissions on Shared Repositories ===&lt;br /&gt;
&lt;br /&gt;
All shared repositories, those in &amp;lt;code&amp;gt;/srv/repos&amp;lt;/code&amp;gt;, including the SokweDB master software repository, are readable and writable by all [[Unix_Administration#wwwdev|developers]].&lt;br /&gt;
&lt;br /&gt;
Please take care when making changes to the master software repository.&lt;br /&gt;
&lt;br /&gt;
It is improper etiquette to alter someone else&amp;#039;s public repository without their permission.&lt;br /&gt;
&lt;br /&gt;
=== Tips on Best Practices for Upstream Repositories ===&lt;br /&gt;
&lt;br /&gt;
==== Avoid Accidental Pushes to the Master Repository ====&lt;br /&gt;
&lt;br /&gt;
It is best to have your public repository be the default place to which you push changes.  That way you don&amp;#039;t accidentally push unproven code to the master repository.&lt;br /&gt;
&lt;br /&gt;
This is most easily accomplished by:&lt;br /&gt;
&lt;br /&gt;
# Creating your public repository in &amp;lt;code&amp;gt;/srv/repos&amp;lt;/code&amp;gt;, as explained above.&lt;br /&gt;
# Cloning that repository to create your working repository, in which development is done.  &lt;br /&gt;
# Pulling from the master repository to populate your working repository.&lt;br /&gt;
&lt;br /&gt;
==== Name the Remote Repositories ====&lt;br /&gt;
&lt;br /&gt;
Typing a long URL when interacting with the SokweDB repositories can be tedious.&lt;br /&gt;
Use &amp;lt;code&amp;gt;git remote&amp;lt;/code&amp;gt; to assign a short name to, e.g., the master repository:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;git remote add blessed ssh://YOURLOGIN@sokwe.janegoodall.org/srv/repos/sokwedb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this you can &amp;lt;code&amp;gt;git push blessed master&amp;lt;/code&amp;gt;, etc., from your local repository to push and pull from &amp;lt;code&amp;gt;blessed&amp;lt;/code&amp;gt; when interacting with the SokweDB master repository.&lt;br /&gt;
&lt;br /&gt;
Note that, normally, your remote interactions are only with &amp;quot;bare&amp;quot; repositories, the repositories that are used only for code storage and not for actual development or deployment.  Repositories in your home directory, on whatever machine, are normally &amp;#039;&amp;#039;not&amp;#039;&amp;#039; bare, and are where development or installation is done.&lt;br /&gt;
&lt;br /&gt;
It is also useful to name the repository in &amp;lt;code&amp;gt;/srv/repos/&amp;lt;/code&amp;gt; on the sokwe server which you use as a personal push/pull endpoint.&lt;br /&gt;
&lt;br /&gt;
Renaming with &amp;lt;code&amp;gt;git remote rename ...&amp;lt;/code&amp;gt; is also possible; if you made your repo by cloning the master then you automatically created the name &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; to refer to the master repository.  Unless you&amp;#039;re a senior developer, &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; should probably refer to your personal &amp;lt;code&amp;gt;sokwe.janegoodall.org&amp;lt;/code&amp;gt; public repository.&lt;br /&gt;
&lt;br /&gt;
== The Build System ==&lt;br /&gt;
&lt;br /&gt;
add text&lt;br /&gt;
&lt;br /&gt;
details on working with the build system can be found [[BuildSystem|here]].&lt;/div&gt;</summary>
		<author><name>StevanEarl</name></author>
	</entry>
</feed>