https://www.sharcnet.ca/help/index.php?title=Special:NewPages&feed=atom&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=Documentation - New pages [en]2024-03-29T12:27:41ZFrom DocumentationMediaWiki 1.25.2https://www.sharcnet.ca/help/index.php/Code_RepositoriesCode Repositories2019-05-06T14:05:45Z<p>Ppomorsk: </p>
<hr />
<div>=Code repositories=<br />
<br />
The code for (most) dedicated programming projects is stored in the SHARCNET [http://www.sharcnet.ca/git git repository]. What follows is some details regarding using git with these repositories. Please refer to our [[Using Git|git page]] for general information on using git.<br />
<br />
==Certificate problems==<br />
<br />
If you are seeing error messages like ''error: server certificate verification failed ...'' while performing a clone, push, fetch, or pull, your system cannot verify the authenticity of ''www.sharcnet.ca''. This is caused by either not connecting directly to ''www.sharcnet.ca'' (as when using ssh port tunneling as described below) or by your SSL stack having dropped support for the [http://www.win.tue.nl/hashclash/rogue-ca deprecated MD5] signatures (as with GnuTLS for SSL under Debian).<br />
<br />
In either case, you will have to turn off git's SSL verification by setting the environment variable ''GIT_SSL_NO_VERIFY=1'' or running the command<br />
<br />
git config http.sslVerify false<br />
<br />
inside your repository (the former must be used for cloning as the repository won't exist yet).<br />
<br />
Our current certificate expires on March 10, 2012. If you have disabled SSL verification due to the MD5 issue, you should re-enable it at this point as we will have purchased a new certificate without this issue.<br />
<br />
==Dropped connections==<br />
<br />
If you are periodically seeing error messages like ''Cannot obtain needed blob ...'' while performing a clone, push, fetch, or pull, an intermediate network is occasionally dropping your connections. This has been a known problem on at least the Western campus.<br />
<br />
A solution is to use SSH to create a tunnel across the intermediate network to the SHARCNET network.<br />
<br />
ssh -N -L <port>:www.sharcnet.ca:443 <user>@<cluster><br />
<br />
where ''<port>'' is a free port (such as 4000), ''<user>'' is your SHARCNET user name, and ''<cluster>'' is any of the SHARCNET clusters. While this ssh session is running, connections to ''localhost:<port>'' will be forwarded ''www.sharcnet.ca:443'' via ''<cluster>''. For example<br />
<br />
GIT_SSL_NO_VERIFY=1 git clone https://localhost:<port>/<project><br />
<br />
will check out ''<project>'' over the tunnel.<br />
<br />
The ''GIT_SSL_NO_VERIFY'' environment variable is required as SSL verification will otherwise fail due to the port forwarding. Once you have checked out the project, you can permanently disable SSL verification by running<br />
<br />
git config http.sslVerify false<br />
<br />
in the project directory.<br />
<br />
Note that every time you access the SHARCNET git server (i.e., do a clone, push, fetch, or pull), you need to have the ssh tunnel running. If you try and access the remote without the ssh tunnel running, you will get an ''error: couldn't connect to host while accessing ...'' message.</div>Edward