Skip to content

Commit 934fd31

Browse files
authored
Merge pull request #119 from achilleas-k/identities-only
LGTM
2 parents b4bf375 + 3a8ac4c commit 934fd31

File tree

5 files changed

+32
-12
lines changed

5 files changed

+32
-12
lines changed

debdock/debian/changelog

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
gin-cli (0.9) beta; urgency=low
1+
gin-cli (0.11); urgency=low
2+
3+
* Release 0.11
4+
* Fixed issue where some git implementations would continuously try to use
5+
the user's key insted of the one generated by gin (macOS).
6+
7+
gin-cli (0.10); urgency=low
8+
9+
* Release 0.10
10+
* Minor bug fixes and improvements.
11+
* Improved the performance of `gin ls` when querying specific files.
12+
13+
gin-cli (0.9); urgency=low
214

315
* Release 0.9
416
* Automatically add files to git and git annex based on size.

debdock/debian/control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: gin-cli
2-
Version: 0.9
2+
Version: {version}
33
Section: base
44
Priority: optional
55
Architecture: amd64

dorelease.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ def debianize(binfiles, annexsa_archive):
243243
# /opt/gin/bin/gin.sh (shell script for running gin cmds)
244244
# /usr/local/gin -> /opt/gin/bin/gin.sh (symlink)
245245

246-
# TODO: Update Debian control file version automatically
247-
248246
# create directory structure
249247
pkgname = "gin-cli"
250248
pkgnamever = "{}-{}".format(pkgname, VERSION["version"])
@@ -279,6 +277,15 @@ def debianize(binfiles, annexsa_archive):
279277
shutil.copy(os.path.join(debmdsrc, "changelog"), docdir)
280278
shutil.copy(os.path.join(debmdsrc, "changelog.Debian"), docdir)
281279

280+
# TODO: Update changelog automatically
281+
# Adding version number to debian control file
282+
controlpath = os.path.join(debcapdir, "control")
283+
with open(controlpath) as controlfile:
284+
controllines = controlfile.read().format(**VERSION)
285+
286+
with open(controlpath, "w") as controlfile:
287+
controlfile.write(controllines)
288+
282289
# gzip changelog and changelog.Debian
283290
cmd = [
284291
"gzip", "--best",

gin-client/repos.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -200,22 +200,21 @@ func (gincl *Client) RmContent(filepaths []string) error {
200200
// Returns the name of the directory in which the repository is cloned.
201201
func (gincl *Client) CloneRepo(repoPath string) (string, error) {
202202
util.LogWrite("CloneRepo")
203+
err := gincl.LoadToken()
204+
if err != nil {
205+
return "", err
206+
}
203207

204208
_, repoName := splitRepoParts(repoPath)
205209
fmt.Printf("Fetching repository '%s'... ", repoPath)
206-
err := gincl.Clone(repoPath)
210+
err = gincl.Clone(repoPath)
207211
if err != nil {
208212
return "", err
209213
}
210214
green.Println("OK")
211215

212216
fmt.Printf("Initialising local storage... ")
213217

214-
err = gincl.LoadToken()
215-
if err != nil {
216-
return "", err
217-
}
218-
219218
// Following shell commands performed from within the repository root
220219
Workingdir = repoName
221220
hostname, err := os.Hostname()

util/keygen.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func PrivKeyPath(user string) string {
6767
// AnnexSSHOpt returns a formatted string that can be used in git-annex commands that should
6868
// make use of the user's private key.
6969
func AnnexSSHOpt(user string) string {
70-
return fmt.Sprintf("annex.ssh-options=-o StrictHostKeyChecking=no -i %s", PrivKeyPath(user))
70+
return fmt.Sprintf("annex.ssh-options=-o IdentitiesOnly=yes -o StrictHostKeyChecking=no -i %s", PrivKeyPath(user))
7171
}
7272

7373
// GitSSHOpt returns a formatted string that can be used in git commands that should make
@@ -86,5 +86,7 @@ func GitSSHEnv(user string) string {
8686
sshbin = strings.Replace(sshbin, ossep, "/", -1)
8787
keyfile := PrivKeyPath(user)
8888
keyfile = strings.Replace(keyfile, ossep, "/", -1)
89-
return fmt.Sprintf("GIT_SSH_COMMAND=%s -i %s -o StrictHostKeyChecking=no", sshbin, keyfile)
89+
gitSSHCmd := fmt.Sprintf("GIT_SSH_COMMAND=%s -i %s -o IdentitiesOnly=yes -o StrictHostKeyChecking=no", sshbin, keyfile)
90+
LogWrite("Added to env: %s", gitSSHCmd)
91+
return gitSSHCmd
9092
}

0 commit comments

Comments
 (0)