Merge pull request #1261 from UprootStaging/sshdUpdate

Sshd update
This commit is contained in:
Naoki Takezoe
2016-08-04 15:51:03 +09:00
committed by GitHub
4 changed files with 5 additions and 5 deletions

View File

@@ -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 {

View File

@@ -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)

View File

@@ -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 {