What credentials to use during 'pod trunk push'? - cocoapods

I have a problem with authenticating my account during pod trunk push because I don't know what username or password I need to use. I have tried my email, as well as typical username which is connected to my Github profile with password, which is stored and was copied from my password manager. What is the biggest possibility I'm doing wrong?
I have tried different username and password scenarios but nothing was working.

To publish a podspec to trunk, the podspec must reference a to public repos.
From https://github.com/Wannabe-games, "The organization has no public repos."
See https://guides.cocoapods.org/making/private-cocoapods.html if you want to work with private CocoaPods.

Related

Git clone with personal access token

when I am trying to make git clone in windows shell or cmd it gives me error of authentication, after that I read that I should make personal token instead of password
then I tried to git clone several times with the token but it still gives me the same error
can anyone help ?
If you have correctly generated your ssh keys and added your public key to your account, you should receive a prompt of some sort, asking if you expected to connect to some specific IP address, and then adding that IP address to trusted addresses when you answer yes. If you still get a message about the authentication failing, it could be a matter of you having made a mistake while adding your public key to your account, or git not finding your private key in the expected place. Without getting a look at the specific error message, I couldn't really say, but I would recommend reviewing the steps you took to add the public key to your account.

"Failed to load owners" error in Xcode using GitHub

I am just starting out trying to connect Xcode to Github. I keep getting this peculiar error, saying "Failed to load owners" whenever I try to create a remote repository from within Xcode under the Source Control Manager. See the error here
If I ignore the warning, the upload then fails with this error.
I cannot seem to find anything online regarding this, and I cannot for the world notice anything being wrong with my GitHub account. The account itself is also accepted by Xcode (successfully added under the Accounts pane in Preferences).
Any help will be greatly appreciated.
In your GitHub account, when you are creating a personal access token to connect your Xcode to GitHub, you have to check off repo, write:packages, and read:packages.
Shown by the image here: https://i.stack.imgur.com/NUiiC.png
Then, you should be able to create the repo without any problems! Hope this helped.
I deleted my GitHub-Profile in the XCode Preferences and setted up again. After that it worked smoothly.
After having had a chat with a kind representative from GitHub Developer Support, it seems like it in my case had to do with my old username and password credentials that was saved on my machine. I quote:
Sometimes applications can use these old credentials, even if you
replace it with the personal access token.
Credentials for git authentication are stored in the Keychain App, and
git passes these onto GitHub when pushing changes to a Repository.
I'd suggest checking in the Keychain App for any records with the name
GitHub.
If they exist, delete those and try the push again.
Git should ask you to enter your username and password and once you
re-enter them, the correct credentials should be stored in your
Keychain app for future use.
So there you have it. This in fact solved my problem. It could also have had something to do with the personal access token that might not be set up with the proper permissions. If you have the same problem as I had you could also check out the scopes on your personal access token to verify it has access to everything you need. Step 7 on the help guide below has a screenshot of what that looks like:
https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
For anyone who's looking for another way. What happened to me is that my personal access token expired, and I needed to generate a new one in Github / setting/ developer/ access token. After I generated a new one, I logged out of Github via Xcode, Logged back in and put in my new access code and cleared the issue!

Change github user in CMD Windows

Right now, my command line is linked to my git account, "Account1".
I want to push to the repository owned by my other account, "Account2"
ex. Right now, when I git push I get:
remote: Permission to Account2/DesiredRepo denied to Account1.
fatal: unable to access 'https://github.com/Account2/DesiredRepo/': The requested URL returned error: 403
How can I login to my other account on cmd to push to that repository? I want something like:
git logout
git login
//Prompts login page of some sort to switch account
I haven't found any solutions so far that work well with windows.
Git has no concept of authentication, so there are no git logout and git login commands. Instead, this is implemented by the protocol used to communicate with a remote. When you installed Git on Windows, you likely accepted the default settings, which includes enabling Git Credential Manager. The first time you entered your GitHub user name and password, this tool stored them (hopefully securely) for use during future sessions. I assume it will allow you to manage your digital identities. You can read this documentation and research further how to switch accounts with this tool.
Alternatively, you can create SSH keys for each account. Add your public keys to the associated account then use the correct private key for authentication. Details are available on the GitHub help pages and documentation.

Personal Access Token in Github not working

I have a private repository on my personal Github account that I work on from time to time, but not on a daily basis.
The repository has been cloned using HTTPS (not SSH or git://).
In order to access the repository from the command line, I set up a personal access token as explained here: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
I am positive it did work back then (I moved away from SSH precisely because this kind of persistent headache).
However, when I try to push to my repository after a few weeks I get the dreaded:
$ remote: Repository not found. fatal: repository
$ 'https://github.com/nicolas-miari/MyPrivateRepo.git/' not found
What am I missing?
Addendum: I deleted the token on Github, created a new one, and followed the instructions here: https://help.github.com/articles/updating-credentials-from-the-osx-keychain/ to clear the old token stored in the keychain. I was able to re-clone my private repository. However,
This still doesn't explain why the previous access token suddenly stopped working, and
My keychain had two "Internet password" entries matching the host github.com: The access token I just deleted, and the my web login password for a different Github account (work). Maybe this has something to do with it?
Background info: To avoid having to log in/out frequently, I have my work account's web credentials saved in Safari (and the Keychain), and my personal account's web credentials saved in Firefox.
Addendum 2: After running the command given on the linked help page:
$ git credential-osxkeychain erase
host=github.com
protocol=https
[enter]
...the additional password is gone from the Keychain (only my newly added Personal Token remains), however I can still log in to my account on Safari...?
Update: Now I can't push to repos from my work account (which credentials I deleted from Keychain...). This system really needs a healthy dose of Just Works...
I have a private repository that I have a dependency on, using https://github.com... in my package.json. I have ssh set up on my computer, also I have personal access token. Even though I provide my personal access token as the password it fails. So I changed my git config url using the following and it worked like a charm.
git config --global url."git#github.com:".insteadOf "https://github.com/"
You can double check your ~/.gitconfig to see something like this:
[url "git#github.com:"]
insteadOf = https://github.com/
I tried all the suggestions I could find and the only thing that worked for me was deleting Git on my computer. Once I downloading it again it asked me to to login with browser, which I did and then it worked
Don't forget that Safari has access to iCloud Keychain
That could explain why, even though you have cleared your local OSX keychain, you still can log on to GitHub with Safari.
My colleague was facing the same issue on Linux, and we just logged out from the browser and logged back in, and git commands from the terminal started working with PAT, don't know the relation of terminal command with browser authentication but it worked.
Best guess is that the token expired.
At the time of writing, you can set the token expiration period. If you attempt to select "No expiration", the GitHub UI gives the explicit warning:
GitHub strongly recommends that you set an expiration date for your token to help keep your information secure.
When you inspect existing Personal Access Tokens, you can see an indication of when it was last used and when it's due to expire.
Not sure about when this question was asked 5 years ago but, I assume, as this type of auth was optional back in the day the UI was probably less helpful. The OP mentioned using the repo occasionally and if you set up a token for the first time with expiry of 30 or 60 days, it's easy to have forgotten that a couple of months later.

Authenticating to a Github remote with name and password

I need upload project to friend's github account. I have login and password. When I try to push project it's always ask name and password, I try to type login and password or main directory of github (paint out on screen with black) with password, try with empty password, but always take alert that it is incorrect name or password. I try to create repo on github and clone it to my Mac and then copy files to this cloned repo and after commit - push. But again I need type name and password. What is it? Some screens:
repo on github
add repo in xcode
What I need type in this fields?
Try type login and password, title of main directory and password,
git-password, and all this names with empty password field. Always I see:
You are using the SSH URL, which requires you to (generate and) register a public RSA key with Github before you can authenticate.
If this is a one-time thing, you can just switch to the HTTPS URL (see the repo's page on github), which allows you to authenticate with the github username and password combo.
Edit:
For more information about how to generate and use SSH keys, check out Github's SSH help articles
For a detailed comparison of the transport protocols supported by Git and their advantages and disadvantages, with respect to Github, see this comparative article

Resources