History of Coding - github Authentication
<p>The one part of this I failed to appreciate initially is that for the public repositories we need to use the <span style="font-family:Courier New,Courier,monospace">https://github.com</span> links rather than the ssh ones using ssh into <span style="font-family:Courier New,Courier,monospace">git@github.com</span>. Some of the ssh links I was trying to pull from were failing to work and git also failed to report that which added to the agrivation. For those links a switch to using the <span style="font-family:Courier New,Courier,monospace">ssh://git@ssh.github.com:443</span> <a href="https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port">link did work</a>, but all of the SSH stuff requires that a user has the following set up properly. I have now switched the submodules in my bitweaver repository to use the https:// links.</p>
<p>A quick sanity check from a useful <a href="https://thomasthornton.cloud/2025/06/30/solving-the-github-403-error-why-your-push-may-be-blocked-and-how-i-fixed-it/">blog by Thomas Thornton</a></p>
<pre>
git remote -v</pre>
<p>This should return the correct github address for the directory one has currently navigated to.</p>
<pre>
h auth refresh</pre>
<p>First problem was that the gh function was not loaded, and then after loading it I got another couple of errors which I failed to make a note of, but now this process runs cleanly</p>
<pre>
! First copy your one-time code: nnnn-nnnn
Press Enter to open https://github.com/login/device in your browser...
✓ Authentication complete.</pre>
<p>Previously I had jumped through another few steps including ...</p>
<pre>
git config --global user.name &amp;quot;lsces&amp;quot;
git config --global user.email &amp;quot;lester@lsces.co.uk&amp;quot;
git remote set-url origin https://github.com/lsces/bitweaver.git
git config --global --add safe.directory /srv/website/bitweaver
</pre>
<p>In addition, I needed to create a suitable SSH key which used the following script</p>
<pre>
ssh-keygen -t ed25519 -C &amp;quot;lester@lsces.co.uk&amp;quot;
eval &amp;quot;$(ssh-agent -s)&amp;quot;
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
git fetch origin
ssh -T git@github.com
</pre>
<p>And finally I am not sure where this fits into the jigsaw but I think it post dates the set-url above.</p>
<pre>
git remote set-url origin &amp;quot;https://lsces:github_pat_@github.com/lsces/bitweaver.git
</pre>
<p>At some point I will tidy this, but now I have it working it's difficult to check just what is necessary, Any input welcome and at some point I will switch the comment facility back on to open a the discussion ... that is providing it does not get overwhelmed with crap again.</p>
<p>A quick sanity check from a useful <a href="https://thomasthornton.cloud/2025/06/30/solving-the-github-403-error-why-your-push-may-be-blocked-and-how-i-fixed-it/">blog by Thomas Thornton</a></p>
<pre>
git remote -v</pre>
<p>This should return the correct github address for the directory one has currently navigated to.</p>
<pre>
h auth refresh</pre>
<p>First problem was that the gh function was not loaded, and then after loading it I got another couple of errors which I failed to make a note of, but now this process runs cleanly</p>
<pre>
! First copy your one-time code: nnnn-nnnn
Press Enter to open https://github.com/login/device in your browser...
✓ Authentication complete.</pre>
<p>Previously I had jumped through another few steps including ...</p>
<pre>
git config --global user.name &amp;quot;lsces&amp;quot;
git config --global user.email &amp;quot;lester@lsces.co.uk&amp;quot;
git remote set-url origin https://github.com/lsces/bitweaver.git
git config --global --add safe.directory /srv/website/bitweaver
</pre>
<p>In addition, I needed to create a suitable SSH key which used the following script</p>
<pre>
ssh-keygen -t ed25519 -C &amp;quot;lester@lsces.co.uk&amp;quot;
eval &amp;quot;$(ssh-agent -s)&amp;quot;
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
git fetch origin
ssh -T git@github.com
</pre>
<p>And finally I am not sure where this fits into the jigsaw but I think it post dates the set-url above.</p>
<pre>
git remote set-url origin &amp;quot;https://lsces:github_pat_@github.com/lsces/bitweaver.git
</pre>
<p>At some point I will tidy this, but now I have it working it's difficult to check just what is necessary, Any input welcome and at some point I will switch the comment facility back on to open a the discussion ... that is providing it does not get overwhelmed with crap again.</p>
