Code Monkey home page Code Monkey logo

Comments (3)

jiangxin avatar jiangxin commented on August 13, 2024

Push using SSH protocol is recommended for some platforms, such as Gerrit. Host name, port number for SSH service are returned from ssh-info API. Login names for different Git over SSH protocol are quite different. For example, Gerrit uses email login name, while for our code platform, we use fixed the login name "git". That's the reason that we set the default login name in proto-agit.go (our implementation for the protocol interface). Maybe it is not necessary for our code platform, because git will use any protocol defined in remote.origin.url which has a username defined already.

from git-repo-go.

ratmice avatar ratmice commented on August 13, 2024

What I didn't understand was ssh-info also can specify a {..., "user":"git"} field,
Which would achieve the same effect, but is more general protocol wise than hard coding it.
I guess it makes sense though if there might be clients around that don't support the user field of ssh-info.
Or if proto:agit is intended to be specific to your platform.

from git-repo-go.

jiangxin avatar jiangxin commented on August 13, 2024

What I didn't understand was ssh-info also can specify a {..., "user":"git"} field,
Which would achieve the same effect, but is more general protocol wise than hard coding it.
I guess it makes sense though if there might be clients around that don't support the user field of ssh-info.
Or if proto:agit is intended to be specific to your platform.

I get your point. Even though you can implement your own protocol by providing new adapter (protocol helper) in protocol-<name>.go or providing external executable (see section "git-repo is extensible" of this post: https://git-repo.info/en/2020/03/agit-flow-and-git-repo/), it would be better to make proto:agit a general protocol. I will clean unnecessary code in proto:agit. Thanks

from git-repo-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.