mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-15 09:55:49 +01:00
@@ -33,7 +33,7 @@ libraryDependencies ++= Seq(
|
||||
"org.apache.commons" % "commons-compress" % "1.11",
|
||||
"org.apache.commons" % "commons-email" % "1.4",
|
||||
"org.apache.httpcomponents" % "httpclient" % "4.5.1",
|
||||
"org.apache.sshd" % "apache-sshd" % "1.0.0",
|
||||
"org.apache.sshd" % "apache-sshd" % "1.2.0",
|
||||
"org.apache.tika" % "tika-core" % "1.13",
|
||||
"com.typesafe.slick" %% "slick" % "2.1.0",
|
||||
"com.novell.ldap" % "jldap" % "2009-10-07",
|
||||
|
||||
@@ -13,7 +13,7 @@ import ControlUtil._
|
||||
import org.eclipse.jgit.api.Git
|
||||
import Directory._
|
||||
import org.eclipse.jgit.transport.{ReceivePack, UploadPack}
|
||||
import org.apache.sshd.server.command.UnknownCommand
|
||||
import org.apache.sshd.server.scp.UnknownCommand
|
||||
import org.eclipse.jgit.errors.RepositoryNotFoundException
|
||||
|
||||
object GitCommand {
|
||||
|
||||
@@ -7,12 +7,12 @@ import gitbucket.core.service.SshKeyService
|
||||
import gitbucket.core.servlet.Database
|
||||
import org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator
|
||||
import org.apache.sshd.server.session.ServerSession
|
||||
import org.apache.sshd.common.session.Session
|
||||
import org.apache.sshd.common.AttributeStore
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
object PublicKeyAuthenticator {
|
||||
// put in the ServerSession here to be read by GitCommand later
|
||||
private val userNameSessionKey = new Session.AttributeKey[String]
|
||||
private val userNameSessionKey = new AttributeStore.AttributeKey[String]
|
||||
|
||||
def putUserName(serverSession:ServerSession, userName:String):Unit =
|
||||
serverSession.setAttribute(userNameSessionKey, userName)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package gitbucket.core.ssh
|
||||
|
||||
import org.apache.sshd.server.command.UnknownCommand
|
||||
import org.apache.sshd.server.scp.UnknownCommand
|
||||
import org.scalatest.FunSpec
|
||||
|
||||
class GitCommandFactorySpec extends FunSpec {
|
||||
|
||||
Reference in New Issue
Block a user