Skip to content

Commit 4682978

Browse files
authored
Merge pull request #413 from ropensci/sourcehut
another try for sourcehut ssh push #388
2 parents 4914349 + c04d9d3 commit 4682978

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/push-to-elsewhere.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,23 @@ jobs:
4747
git remote add gitlab https://${{secrets.UNAME}}:${{secrets.GITLAB}}@gitlab.com/ropensci/osmdata.git
4848
git push --tags gitlab main
4949
50-
- name: Setup SSH for SourceHut
50+
- name: Setup SSH and push to SourceHut
5151
run: |
5252
mkdir -p ~/.ssh
5353
ssh-keyscan -t rsa git.sr.ht >> ~/.ssh/known_hosts
5454
echo "${{ secrets.SOURCEHUT_SSH_KEY }}" > ~/.ssh/id_sourcehut
5555
chmod 600 ~/.ssh/id_sourcehut
56-
eval $(ssh-agent -s)
57-
ssh-add ~/.ssh/id_sourcehut
5856
59-
- name: Add SourceHut remote and push
60-
run: |
57+
# Create SSH config to force using this key
58+
cat > ~/.ssh/config << EOF
59+
Host git.sr.ht
60+
IdentityFile ~/.ssh/id_sourcehut
61+
IdentitiesOnly yes
62+
StrictHostKeyChecking no
63+
EOF
64+
65+
# Use GIT_SSH_COMMAND to ensure the right key is used
66+
export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_sourcehut -o IdentitiesOnly=yes"
67+
6168
git remote add sourcehut git@git.sr.ht:~mpadge/osmdata
6269
git push --tags sourcehut main

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: osmdata
22
Title: Import 'OpenStreetMap' Data as Simple Features or Spatial Objects
3-
Version: 0.3.0.9023
3+
Version: 0.3.0.9024
44
Authors@R: c(
55
person("Joan", "Maspons", , "joanmaspons@gmail.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2286-8727")),

0 commit comments

Comments
 (0)